aboutsummaryrefslogtreecommitdiff
path: root/src/displaywindow.h
blob: 8c4e38850b729dec24c0ee1dea3adf14a3ce92c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * displaywindow.h
 *
 * The display window
 *
 * (c) 2007 Thomas White <taw27@cam.ac.uk>
 *
 *  dtr - Diffraction Tomography Reconstruction
 *
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#ifndef DISPLAYWINDOW_H
#define DISPLAYWINDOW_H

#include <gtk/gtk.h>

#include "control.h"

typedef struct dw_struct {

	ControlContext	*ctx;

	GtkUIManager	*ui;
	GtkActionGroup	*action_group;
	GtkWidget	*window;
	GtkWidget	*bigvbox;
	GtkWidget	*status_bar;
	int 		view;
	GtkWidget	*drawing_area;
	
	/* OpenGL stuff */
	GLfloat		distance;
	GLfloat		x_pos;
	GLfloat		y_pos;
	float		x_start;
	float		y_start;
	float		view_quat[4];
	int		fog;
	GLuint		gl_list_id;			/* Display list for "everything else" */
	int		gl_use_buffers;			/* 0=use vertex arrays only, otherwise use VBOs */
	GLuint		gl_ref_vertex_buffer;		/* "Measured reflection" stuff */
	GLfloat		*gl_ref_vertex_array;
	GLsizei		gl_ref_num_vertices;
	GLuint		gl_marker_vertex_buffer;	/* Marker "reflection" stuff */
	GLuint		gl_marker_normal_buffer;
	GLfloat		*gl_marker_vertex_array;
	GLfloat		*gl_marker_normal_array;
	GLsizei		gl_marker_num_vertices;
	GLuint		gl_gen_vertex_buffer;		/* Generated reflection stuff */
	GLuint		gl_gen_normal_buffer;
	GLfloat		*gl_gen_vertex_array;
	GLfloat		*gl_gen_normal_array;
	GLsizei		gl_gen_num_vertices;

} DisplayWindow;

extern DisplayWindow *displaywindow_open(ControlContext *ctx);

extern void displaywindow_update(DisplayWindow *dw);

#endif	/* DISPLAYWINDOW_H */