1 /* $Id: gl.h 108 2009-01-08 16:38:36Z mmmaddd $ */
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
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
;
41 /* to be set by caller */
46 G3DMatrix shadow_matrix
[16];
54 /* can be read by caller */
56 /* to be used by caller only */
57 G3DGLRenderState
*state
;
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
);