[contrib][haskell] Xpad pixels size is always 130e-6
[hkl.git] / gui / hkl-gui-3d-gl.h
blobd040756d20f8ff5a41d031fb4e880c91e340220e
1 /* $Id: gl.h 108 2009-01-08 16:38:36Z mmmaddd $ */
3 /*
4 G3DViewer - 3D object viewer
6 Copyright (C) 2005, 2006 Markus Dahms <mad@automagically.de>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef _GL_H
24 #define _GL_H
26 #include <g3d/types.h>
28 #define G3D_FLAG_GL_SPECULAR (1L << 0)
29 #define G3D_FLAG_GL_SHININESS (1L << 1)
30 #define G3D_FLAG_GL_ALLTWOSIDE (1L << 2)
31 #define G3D_FLAG_GL_TEXTURES (1L << 3)
32 #define G3D_FLAG_GL_COLORS (1L << 4)
33 #define G3D_FLAG_GL_POINTS (1L << 5)
34 #define G3D_FLAG_GL_COORD_AXES (1L << 6)
35 #define G3D_FLAG_GL_SHADOW (1L << 7)
36 #define G3D_FLAG_GL_ISOMETRIC (1L << 8)
38 typedef struct _G3DGLRenderState G3DGLRenderState;
40 typedef struct {
41 /* to be set by caller */
42 gfloat zoom;
43 gfloat aspect;
44 gfloat bgcolor[4];
45 gfloat quat[4];
46 G3DMatrix shadow_matrix[16];
47 G3DFloat min_y;
48 guint32 norm_count;
49 gfloat offx;
50 gfloat offy;
51 gint32 glflags;
52 gboolean updated;
53 gboolean initialized;
54 /* can be read by caller */
55 guint32 avg_msec;
56 /* to be used by caller only */
57 G3DGLRenderState *state;
58 } G3DGLRenderOptions;
60 void gl_set_twoside(gboolean twoside);
61 void gl_set_textures(gboolean textures);
62 void gl_load_texture(gpointer key, gpointer value, gpointer data);
63 void gl_draw(G3DGLRenderOptions *options, G3DModel *model);
64 #endif