atomes 1.3.1
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
m_render.c
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2026 by CNRS and University of Strasbourg */
15
21
22/*
23* This file: 'm_render.c'
24*
25* Contains:
26*
27
28 - The functions to create the 'OpenGL -> Render' submenu
29
30*
31* List of functions:
32
33 void set_render (gpointer data);
34
35*/
36
37#include "global.h"
38#include "glview.h"
39#include "glwindow.h"
40
48void set_render (gpointer data)
49{
50 tint * the_data = (tint *)data;
51 project * this_proj = get_project_by_id(the_data -> a);
52 int i = this_proj -> modelgl -> anim -> last -> img -> render;
53 int j = the_data -> b;
54 if (i != j)
55 {
56 this_proj -> modelgl -> anim -> last -> img -> render = NONE;
57 this_proj -> modelgl -> anim -> last -> img -> render = j;
58 this_proj -> modelgl -> create_shaders[MAXIS] = TRUE;
59 update (this_proj -> modelgl);
60 }
61}
Global variable declarations Global convenience function declarations Global data structure defin...
project * get_project_by_id(int p)
get project pointer using id number
Definition project.c:120
void update(glwin *view)
update the rendering of the OpenGL window
Definition glview.c:461
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
render
Definition glview.h:191
@ NONE
Definition glview.h:181
@ MAXIS
Definition glwin.h:94
Function declarations for the creation of the OpenGL window.
void set_render(gpointer data)
set OpenGL rendering mode callback
Definition m_render.c:48
Definition global.h:118
GtkWidget * img
Definition workspace.c:70