atomes 1.1.15
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
ogl_draw.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-2024 by CNRS and University of Strasbourg */
15
22/*
23* This file: 'ogl_draw.c'
24*
25* Contains:
26*
27
28 - The OpenGL window drawing funcions
29
30*
31* List of functions:
32
33 void print_matrices ();
34 void setup_camera ();
35 void unrotate_camera ();
36 void duplicate_material_and_lightning (image * new_img, image * old_img);
37 void add_image ();
38 void at_shift (atom * at, float * shift);
39 void at_unshift (atom * at, float * shift);
40 void draw (glwin * view);
41
42 screen_string * duplicate_screen_string (screen_string * old_s);
43 atom * duplicate_atom (atom * at);
44
45 image * duplicate_image (image * old_img);
46
47*/
48
49#include "global.h"
50#include "glview.h"
51#include "dlp_field.h"
52#include <time.h>
53
54extern ColRGBA init_color (int id, int numid);
55extern Light * copy_light_sources (int dima, int dimb, Light * old_sp);
57double x, y, z;
58GLUquadricObj * quadric;
67int qual;
70int step;
71
72extern int nbs, nbl;
73extern void create_atom_lists (gboolean to_pick);
74extern int create_bond_lists (gboolean to_pick);
75extern int create_selection_lists ();
76extern void create_poly_lists ();
77extern void create_ring_lists ();
78extern int create_box_lists ();
79extern int create_axis_lists ();
80extern int create_pick_lists ();
81extern int create_label_lists ();
82extern void create_measures_lists ();
83extern void create_light_lists ();
84extern void create_slab_lists (project * this_proj);
85extern void create_volumes_lists ();
86
93{
94 g_debug ("*** Print Matrices ***");
95 g_debug ("\n");
96 g_debug (":: MODEL_MATRIX");
97 m4_print (wingl -> model_matrix);
98 g_debug ("\n");
99 g_debug (":: VIEW_MATRIX");
100 m4_print (wingl -> view_matrix);
101 g_debug ("\n");
102 g_debug (":: MODEL_VIEW_MATRIX");
103 m4_print (wingl -> model_view_matrix);
104 g_debug ("\n");
105 g_debug (":: NORMAL_MATRIX");
106 m4_print (wingl -> normal_matrix);
107 g_debug ("\n");
108 g_debug (":: PROJECTION_MATRIX");
109 m4_print (wingl -> projection_matrix);
110 g_debug ("\n");
111 g_debug (":: PROJECTION_MODEL_VIEW_MATRIX");
112 m4_print (wingl -> proj_model_view_matrix);
113}
114
121{
122 wingl -> model_position = vec3 (0.0, 0.0, -plot -> p_depth);
123 wingl -> model_matrix = m4_translation (wingl -> model_position);
124 wingl -> proj_model_matrix = m4_mul (wingl -> projection_matrix, wingl -> model_matrix);
125 wingl -> view_matrix = m4_quat_rotation (plot -> rotation_quaternion);
126 vec4_t quat;
127 quat = plot -> rotation_quaternion;
128 quat.z = - quat.z;
129 wingl -> un_view_matrix = m4_quat_rotation (quat);
130 wingl -> model_view_matrix = m4_mul (wingl -> model_matrix, wingl -> view_matrix);
131 wingl -> normal_matrix = m4_transpose (m4_invert_affine(wingl -> model_matrix));
132 wingl -> proj_model_view_matrix = m4_mul (wingl -> projection_matrix, wingl -> model_view_matrix);
133 wingl -> proj_view_matrix = m4_mul (wingl -> projection_matrix, wingl -> view_matrix);
134 wingl -> view_model_matrix = m4_mul (wingl -> view_matrix, wingl -> model_matrix);
135 // print_matrices();
136}
137
144{
145 vec4_t quat;
146 quat = plot -> rotation_quaternion;
147 quat.z = - quat.z;
148 wingl -> model_view_matrix = m4_mul (wingl -> model_view_matrix, m4_quat_rotation (quat));
149}
150
159{
160 screen_string * new_s = g_malloc0 (sizeof*new_s);
161 new_s -> word = g_strdup_printf ("%s", old_s -> word);
162 new_s -> col = old_s -> col;
163 int i;
164 for (i=0; i<3; i++) new_s -> shift[i] = old_s -> shift[i];
165 new_s -> num_instances = old_s -> num_instances;
166 new_s -> instances = duplicate_float (old_s -> num_instances*4, old_s -> instances);
167 new_s -> prev = NULL;
168 new_s -> last = NULL;
169 return new_s;
170}
171
181{
182 new_img -> quality = old_img -> quality;
183 new_img -> render = old_img -> render;
184 new_img -> lights = old_img -> lights;
185 new_img -> l_ght = copy_light_sources (old_img -> lights, old_img -> lights, old_img -> l_ght);
186 new_img -> m_terial.predefine = old_img -> m_terial.predefine;
187 new_img -> m_terial.albedo = old_img -> m_terial.albedo;
188 int i;
189 for (i=0; i<6; i++) new_img -> m_terial.param[i] = old_img -> m_terial.param[i];
190 new_img -> f_g.mode = old_img -> f_g.mode;
191 new_img -> f_g.based = old_img -> f_g.based;
192 new_img -> f_g.density = old_img -> f_g.density;
193 for (i=0; i<2; i++) new_img -> f_g.depth[i] = old_img -> f_g.depth[i];
194 new_img -> f_g.color = old_img -> f_g.color;
195}
196
205{
206 int i, j, k, l, m;
207 image * new_img = g_malloc0 (sizeof*new_img);
208
209 // This line will copy all the stuff that is not dynamically allocated
210 * new_img = * old_img;
211
212 j = proj_gl -> nspec;
213 for (i=0; i<2; i++)
214 {
215 new_img -> color_map[i] = old_img -> color_map[i];
216 new_img -> show_atom[i] = duplicate_bool(j, old_img -> show_atom[i]);
217 new_img -> show_label[i] = duplicate_bool(j, old_img -> show_label[i]);
218 }
219
220 new_img -> sphererad = duplicate_double(2*j, old_img -> sphererad);
221 new_img -> pointrad = duplicate_double(2*j, old_img -> pointrad);
222 new_img -> atomicrad = duplicate_double(2*j, old_img -> atomicrad);
223 new_img -> bondrad = g_malloc0 (2*j*sizeof*new_img -> bondrad);
224 new_img -> linerad = g_malloc0 (2*j*sizeof*new_img -> linerad);
225 new_img -> at_color = duplicate_color (2*j, old_img -> at_color);
226 for (i=0; i<2*j; i++)
227 {
228 new_img -> bondrad[i] = duplicate_double(2*j, old_img -> bondrad[i]);
229 new_img -> linerad[i] = duplicate_double(2*j, old_img -> linerad[i]);
230 }
231
232 for (i=0; i<9; i++)
233 {
234 new_img -> show_coord[i] = duplicate_bool(coord_gl -> totcoord[i], old_img -> show_coord[i]);
235 if (i < 2 || i > 3) new_img -> show_poly[i] = duplicate_bool(coord_gl -> totcoord[i], old_img -> show_poly[i]);
236 k = (i < 2) ? proj_gl -> nspec : 1;
237 new_img -> spcolor[i] = g_malloc (k*sizeof*new_img -> spcolor[i]);
238 for (j=0; j<k; j++)
239 {
240 new_img -> spcolor[i][j] = duplicate_color (coord_gl -> totcoord[i], old_img -> spcolor[i][j]);
241 }
242 }
243 new_img -> at_data = g_malloc0 (proj_gl -> natomes*sizeof*new_img -> at_data);
244 for (i=0; i<proj_gl -> natomes; i++)
245 {
246 new_img -> at_data[i].show[0] = proj_gl -> atoms[step][i].show[0];
247 new_img -> at_data[i].show[1] = proj_gl -> atoms[step][i].show[1];
248 new_img -> at_data[i].label[0] = proj_gl -> atoms[step][i].label[0];
249 new_img -> at_data[i].label[1] = proj_gl -> atoms[step][i].label[1];
250 new_img -> at_data[i].pick[0] = proj_gl -> atoms[step][i].pick[0];
251 new_img -> at_data[i].cloned = proj_gl -> atoms[step][i].cloned;
252 new_img -> at_data[i].style = proj_gl -> atoms[step][i].style;
253 }
254
255 for (i=0; i<3; i++)
256 {
257 new_img -> axis_title[i] = g_strdup_printf ("%s", old_img -> axis_title[i]);
258 }
259 new_img -> axis_color = NULL;
260 if (old_img -> axis_color != NULL)
261 {
262 new_img -> axis_color = duplicate_color (3, old_img -> axis_color);
263 }
264
265 screen_string * stmp_a, * stmp_b;
266
267 for (i=0; i<5; i++)
268 {
269 if (i<2)new_img -> labels_format[i] = old_img -> labels_format[i];
270 new_img -> labels_font[i] = g_strdup_printf ("%s", old_img -> labels_font[i]);
271 new_img -> labels_color[i] = NULL;
272 for (j=0; j<3; j++)new_img -> labels_shift[i][j] = old_img -> labels_shift[i][j];
273 if (old_img -> labels_color[i] != NULL)
274 {
275 k = (i < 2) ? proj_gl -> nspec : 1;
276 new_img -> labels_color[i] = duplicate_color (k, old_img -> labels_color[i]);
277 }
278 new_img -> labels_list[i] = NULL;
279 if (old_img -> labels_list[i] != NULL)
280 {
281 new_img -> labels_list[i] = duplicate_screen_string (old_img -> labels_list[i]);
282 new_img -> labels_list[i] -> last = duplicate_screen_string (old_img -> labels_list[i] -> last);
283 stmp_a = old_img -> labels_list[i] -> last;
284 stmp_b =new_img -> labels_list[i] -> last;
285 while (stmp_a -> prev != NULL)
286 {
287 stmp_b -> prev = duplicate_screen_string (stmp_a -> prev);
288 stmp_b -> prev -> last = stmp_b -> last;
289 stmp_a = stmp_a -> prev;
290 stmp_b = stmp_b -> prev;
291 }
292 }
293 }
294
295 duplicate_material_and_lightning (new_img, old_img);
296
297 // Atom selection
298 for (i=0; i<2; i++) new_img -> selected[i] = duplicate_ogl_selection (old_img -> selected[i]);
299
300 // Rings poly if any 'isolated'
301 if (wingl -> rings)
302 {
303 for (i=0; i<5; i++)
304 {
305 if (wingl -> ring_max[i])
306 {
307 m = 0;
308 for (j=0; j< coord_gl -> totcoord[i+4]; j++)
309 {
310 k = coord_gl -> geolist[i+4][0][j];
311 for (l=0; l<wingl -> num_rings[i][step][k-1]; l++)
312 {
313 if (wingl -> show_rpoly[i][step][k-1][l]) m++;
314 }
315 }
316 if (m)
317 {
318 new_img -> i_rings[i] = allocdint (m+1, 2);
319 new_img -> i_rings[i][0][0] = m;
320 m = 1;
321 for (j=0; j<coord_gl -> totcoord[i+4]; j++)
322 {
323 k = coord_gl -> geolist[i+4][0][j];
324 for (l=0; l<wingl -> num_rings[i][step][k-1]; l++)
325 {
326 if (wingl -> show_rpoly[i][step][k-1][l])
327 {
328 new_img -> i_rings[i][m][0] = j;
329 new_img -> i_rings[i][m][1] = l;
330 m ++;
331 }
332 }
333 }
334 }
335 }
336 }
337 }
338
339 // Volumes
340 if (wingl -> volumes)
341 {
342 for (i=0; i<2; i++)
343 {
344 for (j=0; j<FILLED_STYLES; j++)
345 {
346 new_img -> fm_show_vol[i][j] = duplicate_bool (coord_gl -> totcoord[2+i], old_img -> fm_show_vol[i][j]);
347 for (k=0; k<coord_gl -> totcoord[2+i]; k++)
348 {
349 new_img -> fm_vol_col[i][j][k] = old_img -> fm_vol_col[i][j][k];
350 }
351 }
352 }
353 }
354 return new_img;
355}
356
363{
364 snapshot * nextsnap = g_malloc0 (sizeof*nextsnap);
365 nextsnap -> img = duplicate_image (plot);
366 nextsnap -> img -> id ++;
367
368 // Now the pointers
369 if (wingl -> anim -> frames == 0)
370 {
371 wingl -> anim -> first -> prev = NULL;
372 wingl -> anim -> last = nextsnap;
373 wingl -> anim -> last -> prev = NULL;
374 wingl -> anim -> first = nextsnap;
375
376 }
377 else
378 {
379 wingl -> anim -> last -> next = nextsnap;
380 nextsnap -> prev = wingl -> anim -> last;
381 wingl -> anim -> last = wingl -> anim -> last -> next;
382 wingl -> anim -> last -> img -> id = wingl -> anim -> frames;
383 }
384 wingl -> anim -> frames += 1;
385}
386
388
397{
398 atom * bt = g_malloc0 (sizeof*bt);
399 bt -> x = at -> x;
400 bt -> y = at -> y;
401 bt -> z = at -> z;
402 bt -> sp = at -> sp;
403 bt -> id = at -> id;
404 bt -> style = at -> style;
405 bt -> cloned = at -> cloned;
406 int i;
407 for (i=0; i<2; i++)
408 {
409 bt -> show[i] = at -> show[i];
410 bt -> pick[i] = at -> pick[i];
411 bt -> label[i] = at -> label[i];
412 }
413 for (i=0; i<5; i++)
414 {
415 bt -> coord[i] = at -> coord[i];
416 }
417 bt -> numv = at -> numv;
418 bt -> fid = at -> fid;
419 bt -> faid = at -> faid;
420 if (bt -> numv) bt -> vois = duplicate_int (bt -> numv, at -> vois);
421 return bt;
422}
423
432void at_shift (atom * at, float * shift)
433{
434 at -> x += shift[0];
435 at -> y += shift[1];
436 at -> z += shift[2];
437}
438
447void at_unshift (atom * at, float * shift)
448{
449 at -> x -= shift[0];
450 at -> y -= shift[1];
451 at -> z -= shift[2];
452}
453
461void draw (glwin * view)
462{
463 wingl = view;
464 proj_gl = get_project_by_id(view -> proj);
465 proj_sp = proj_gl -> nspec;
466 proj_at = proj_gl -> natomes;
467 coord_gl = proj_gl -> coord;
468 cell_gl = & proj_gl -> cell;
469 plot = wingl -> anim -> last -> img;
470 qual = plot -> quality-1;
471 acolorm = plot -> color_map[0];
472 pcolorm = plot -> color_map[1];
473 step = plot -> step;
474 box_gl = (cell_gl -> npt) ? & cell_gl -> box[step] : & cell_gl -> box[0];
475
476/* #ifdef DEBUG
477 clock_gettime (CLOCK_MONOTONIC, & start_time);
478 GLuint GPU_time;
479 glGenQueries (1, & GPU_time);
480 glBeginQuery (GL_TIME_ELAPSED, GPU_time);
481// #endif */
482 // First, if needed, we prepare the display lists
483 if (proj_at)
484 {
485 if (wingl -> create_shaders[ATOMS] && wingl -> n_shaders[ATOMS][step] < 0) create_atom_lists (FALSE);
486 if (wingl -> create_shaders[BONDS] && wingl -> n_shaders[BONDS][step] < 0) wingl -> n_shaders[BONDS][step] = create_bond_lists (FALSE);
487 if (wingl -> create_shaders[SELEC] && wingl -> n_shaders[SELEC][step] < 0) wingl -> n_shaders[SELEC][step] = create_selection_lists ();
488 if (wingl -> create_shaders[POLYS] && wingl -> n_shaders[POLYS][step] < 0) create_poly_lists ();
489 if (wingl -> create_shaders[RINGS] && wingl -> n_shaders[RINGS][step] < 0) create_ring_lists ();
490 if (wingl -> create_shaders[PICKS]) wingl -> n_shaders[PICKS][0] = create_pick_lists ();
491 if (wingl -> create_shaders[SLABS]) create_slab_lists (proj_gl);
492 if (wingl -> create_shaders[VOLMS] && wingl -> n_shaders[VOLMS][step] < 0) create_volumes_lists ();
493 if (wingl -> create_shaders[LABEL]) wingl -> n_shaders[LABEL][0] = create_label_lists ();
494 if (wingl -> create_shaders[MEASU]) create_measures_lists ();
495 }
496 else
497 {
498 int i;
499 for (i=0; i<NGLOBAL_SHADERS; i++) cleaning_shaders (wingl, i);
500 }
501 if (wingl -> create_shaders[MDBOX]) wingl -> n_shaders[MDBOX][0] = create_box_lists ();
502 if (wingl -> create_shaders[MAXIS]) wingl -> n_shaders[MAXIS][0] = create_axis_lists ();
503 if (wingl -> create_shaders[LIGHT]) create_light_lists ();
504
505 setup_camera ();
506 // We draw normal scene or picking mode scene (only atoms or selection)
507
508 if (wingl -> to_pick)
509 {
510 // Picking mode scene
511 glDisable (GL_LIGHTING);
512 glClearColor (plot -> backcolor.red,
513 plot -> backcolor.green,
514 plot -> backcolor.blue,
515 1.0);
516 glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
517
519
520 glEnable (GL_LIGHTING);
521 }
522 else
523 {
524 // Normal mode scene
525 glClearColor (plot -> backcolor.red, plot -> backcolor.green, plot -> backcolor.blue, plot -> backcolor.alpha);
526 glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
527
528 // We want to draw the elements by reverse order
529 // so that atoms will be last and and will appear on
530 // top of bonds and so on
531
532 // Box
534
535 // The bonds
537
538 // Now the atoms
540
541 // The selected atoms/bonds
543
544 int i = plot -> render;
545 plot -> render = FILL;
546
547 // Atom labels
549
550 // Axis if centered
551 if (view -> anim -> last -> img -> axispos == 4) draw_vertices (MAXIS);
552
553 // Last the coordination polyhedra
556
557 // Measures
559
560 // Slab
562
563 // Volumes
565
566 // Axis if not centered
567 if (view -> anim -> last -> img -> axispos != 4) draw_vertices (MAXIS);
568
569 // Lights
571
572 plot -> render = i;
573
574 //draw_labels ();
575 if (wingl -> record) add_image ();
576 }
577/* #ifdef DEBUG
578 glEndQuery (GL_TIME_ELAPSED);
579 GLint done = 0;
580 while (! done)
581 {
582 glGetQueryObjectiv (GPU_time, GL_QUERY_RESULT_AVAILABLE, & done);
583 }
584 GLint GPU_res;
585 glGetQueryObjectiv (GPU_time, GL_QUERY_RESULT, & GPU_res);
586 g_print (":: TIME TO RENDER (GPU) = %f s\n", (double)GPU_res/CLOCKS_PER_SEC);
587 clock_gettime (CLOCK_MONOTONIC, & stop_time);
588 g_print (":: TIME TO RENDER (CPU) = %s\n", calculation_time(FALSE, get_calc_time (start_time, stop_time)));
589// #endif */
590}
591
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
Definition labels.c:56
vec3_t model_position
ColRGBA col
Definition d_measures.c:77
int * shift
Definition d_measures.c:72
int atoms[NUM_STYLES][2]
Variable declarations for the creation of the DL_POLY input file(s)
int * duplicate_int(int num, int *old_val)
copy a list of int
Definition global.c:560
float * duplicate_float(int num, float *old_val)
copy a list of float
Definition global.c:592
gboolean * duplicate_bool(int num, gboolean *old_val)
copy a list of gboolean
Definition global.c:576
int ** allocdint(int xal, int yal)
allocate an int ** pointer
Definition global.c:330
double * duplicate_double(int num, double *old_val)
copy a list of double
Definition global.c:608
Global variable declarations Global convenience function declarations Global data structure defin...
project * proj
ColRGBA * duplicate_color(int num, ColRGBA *col)
duplicate a ColRGBA pointer
Definition gtk-misc.c:1602
project * get_project_by_id(int p)
get project pointer using id number
Definition project.c:120
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
gboolean pick
render
Definition glview.h:182
@ FILL
Definition glview.h:183
void cleaning_shaders(glwin *view, int shader)
re-initialize an OpenGL shader
void draw_vertices(int id)
Draw OpenGL shader program.
#define FILLED_STYLES
Definition glwin.h:105
@ BONDS
Definition glwin.h:90
@ PICKS
Definition glwin.h:97
@ LABEL
Definition glwin.h:98
@ VOLMS
Definition glwin.h:102
@ SLABS
Definition glwin.h:101
@ POLYS
Definition glwin.h:92
@ MAXIS
Definition glwin.h:94
@ SELEC
Definition glwin.h:91
@ MDBOX
Definition glwin.h:93
@ MEASU
Definition glwin.h:99
@ ATOMS
Definition glwin.h:89
@ RINGS
Definition glwin.h:96
@ LIGHT
Definition glwin.h:100
#define NGLOBAL_SHADERS
Definition glwin.h:69
image * plot
Definition ogl_draw.c:66
screen_string * duplicate_screen_string(screen_string *old_s)
create a copy a screen_string data structure
Definition ogl_draw.c:158
atom_selection * duplicate_ogl_selection(atom_selection *old_sel)
copy an atom selection
Definition calc.c:119
Light * copy_light_sources(int dima, int dimb, Light *old_sp)
create a copy of a list of light sources
Definition w_advance.c:391
GLUquadricObj * quadric
Definition ogl_draw.c:58
int create_bond_lists(gboolean to_pick)
prepare bond(s) and clone bond(s) OpenGL rendering
Definition d_bonds.c:670
void print_matrices()
print OpenGL matrices
Definition ogl_draw.c:92
void draw(glwin *view)
main drawing subroutine for the OpenGL window
Definition ogl_draw.c:461
void at_unshift(atom *at, float *shift)
correct atomic coordinates modified to display image in cell replica
Definition ogl_draw.c:447
project * proj_gl
Definition ogl_draw.c:60
glwin * wingl
Definition ogl_draw.c:59
void unrotate_camera()
unrotate OpenGL camera
Definition ogl_draw.c:143
void create_ring_lists()
prepare ring(s) polyhedra OpenGL rendering
Definition d_rings.c:169
int proj_sp
Definition ogl_draw.c:61
image * duplicate_image(image *old_img)
create a copy of an image data structure
Definition ogl_draw.c:204
void create_slab_lists(project *this_proj)
prepare slab(s) OpenGL rendering
Definition d_box.c:898
void at_shift(atom *at, float *shift)
modify atomic coordinates to display image in cell replica
Definition ogl_draw.c:432
void create_light_lists()
prepare light(s) OpenGL rendering
Definition d_box.c:467
ColRGBA init_color(int id, int numid)
initialize color based id number over total number of elements
Definition initcoord.c:81
void duplicate_material_and_lightning(image *new_img, image *old_img)
copy the material and lightning parameters of an image data structure
Definition ogl_draw.c:180
box_info * box_gl
Definition ogl_draw.c:64
void create_volumes_lists()
prepare volume(s) OpenGL rendering
Definition d_box.c:939
int nbs
Definition d_atoms.c:176
void setup_camera()
setup OpenGL camera
Definition ogl_draw.c:120
int create_label_lists()
prepare atomic label(s) OpenGL rendering
Definition d_label.c:157
void update_gl_pick_colors()
int create_pick_lists()
prepare the picking list OpenGL rendering
int qual
Definition ogl_draw.c:67
int create_axis_lists()
prepare axis OpenGL rendering
Definition d_axis.c:267
double z
Definition ogl_draw.c:57
double y
Definition ogl_draw.c:57
int step
Definition ogl_draw.c:70
void create_poly_lists()
prepare coordination polyhedra(s) OpenGL rendering
Definition d_poly.c:630
int pcolorm
Definition ogl_draw.c:69
int nbl
Definition ogl_draw.c:72
int acolorm
Definition ogl_draw.c:68
int create_box_lists()
prepare box OpenGL rendering
Definition d_box.c:290
atom * duplicate_atom(atom *at)
copy (partially) an atom data structure
Definition ogl_draw.c:396
void create_atom_lists(gboolean to_pick)
prepare atom(s) and clone(s) OpenGL rendering
Definition d_atoms.c:610
int create_selection_lists()
prepare the selected atom(s) and bond(s) OpenGL rendering
coord_info * coord_gl
Definition ogl_draw.c:63
int proj_at
Definition ogl_draw.c:62
cell_info * cell_gl
Definition ogl_draw.c:65
void add_image()
add an image to the animation
Definition ogl_draw.c:362
double x
Definition ogl_draw.c:57
void create_measures_lists()
prepare measure(s) OpenGL rendering
Definition d_measures.c:673
Definition glwin.h:181
Definition global.h:886
Definition glwin.h:875
Definition glwin.h:277
int style
Definition glwin.h:427
float z
Definition math_3d.h:149
GtkWidget * axis_title
Definition tab-4.c:101
GtkWidget * img
Definition workspace.c:70