DI-Guy SDK Documentation  13.2
graphics_init_ogl.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2016 VT MAK
4  ** All rights reserved.
5  *********************************************************************/
6 
7 
8 /*********************************************************************
9  **
10  *t DI-Guy Graphics Init Structure, OpenGL
11  **
12  */
13 
14 #ifndef __GRAPHICS_INIT_OGL_H
15 #define __GRAPHICS_INIT_OGL_H
16 
17 #ifdef _WIN32
18 #include <windows.h>
19 #endif
20 #include <GL/gl.h>
21 
22 
23 
24 /****************************************************************************/
25 typedef struct bdiGraphicsInitOgl
26 {
27  /*l
28  *b Description:
29  **
30  ** Determines whether textures will be applied. Default is 1.
31  */
32  int use_textures;
33 
34  /*l
35  *b Description:
36  **
37  ** Determines whether materials will be applied. Default is 1.
38  */
39  int use_materials;
40 
41 
42  /*l
43  *b Description:
44  **
45  ** Determines the OpenGL magnification filtering method
46  ** for textures. Should be one of:
47  **
48  *e GL_NEAREST
49  *e GL_LINEAR
50  **
51  ** Default is GL_LINEAR
52  */
53  GLenum texture_mag_filter;
54 
55  /*l
56  *b Description:
57  **
58  ** Determines the OpenGL minification filtering method
59  ** for textures. Should be one of:
60  **
61  *e GL_NEAREST
62  *e GL_LINEAR
63  *e GL_NEAREST_MIPMAP_NEAREST
64  *e GL_NEAREST_MIPMAP_LINEAR
65  *e GL_LINEAR_MIPMAP_NEAREST
66  *e GL_LINEAR_MIPMAP_LINEAR
67  **
68  ** Default is GL_LINEAR_MIPMAP_LINEAR
69  */
70  GLenum texture_min_filter;
71 
72  /*l
73  *b Description:
74  **
75  ** Determines the OpenGL anisotropic filtering level for textures.
76  ** Should be a power of 2 typically up to 16.
77  ** Default is 0.0f
78  */
80 
81 
82  /*l
83  *b Description:
84  **
85  ** Determines whether frame buffer object extensions are used.
86  ** In some cases using frame buffer objects can improve performance
87  ** of intersection testing.
88  **
89  *b This currently only has an effect on Win32 platforms.
90  **
91  ** There is a known problem with some graphics cards that using
92  ** frame buffer objects leads to a program crash.
93  **
94  ** Possible values are:
95  **
96  *a 0 - don't use frame buffer object extensions
97  *a 1 - do use frame buffer object extensions
98  **
99  ** Default is 0.
100  */
101  int use_FBOs;
102 
103 
104  /*l
105  *b Description:
106  **
107  ** Sets the value passed to the factor argument of the
108  ** glPolygonOffset() function. This function is used when
109  ** rendering polygon subfaces, which are commonly used for
110  ** edge highlighting and decals on signs.
111  **
112  ** Default is -1.0.
113  */
114  float polygon_offset_factor;
115 
116  /*l
117  *b Description:
118  **
119  ** Sets the value passed to the units argument of the
120  ** glPolygonOffset() function.
121  **
122  ** Default is -1.0.
123  */
125 
126  /*l
127  *b Description:
128  **
129  ** Sets if a default shooting intersection function should be
130  ** automatically set up. See
131  ** diguyScenario::set_default_fire_weapon_intersection_function()
132  ** for more details.
133  **
134  ** Default is 1.
135  */
137 
138  /*l
139  *b Description:
140  **
141  ** Sets whether .flt and .dae files will be loaded as geometry
142  ** files optimized for DI-Guy use.
143  **
144  ** Generated files will be put into a subdirectory of the DI-Guy
145  ** geometry directory, and will be automatically updated as needed
146  ** (doesn't exist, or original file is newer).
147  **
148  ** The .bdg geometry format is a smaller, more efficient version of
149  ** the geometry data encoded in .flt and .dae files. It is an
150  ** internal DI-Guy format that is not directly supported by geometry
151  ** editing programs.
152  **
153  ** There is no quality trade-off in using optimized geometry files,
154  ** so it is recommended that they always be enabled.
155  **
156  ** Default is 1.
157  */
159 
160  /*l
161  *b Description:
162  **
163  ** Sets whether compressed texture files should be generated from
164  ** source uncompressed texture files in order to reduce texture
165  ** memory usage.
166  **
167  ** There is a quality trade-off when using compressed textures. If
168  ** there are too many undesired artifacts in the generated textures,
169  ** they should not be used.
170  **
171  ** Generated files will be put into a subdirectory of the DI-Guy
172  ** geometry directory, and will be automatically updated as needed
173  ** (doesn't exist, or original file is newer).
174  **
175  ** The compressed texture files will be in the .dds (DirectDraw
176  ** Surface) format.
177  **
178  ** Default is 1.
179  */
181 
182  /*l
183  *b Description:
184  **
185  ** Sets whether SRGB textures should be used, these allow a relatively
186  ** free lookup into texture maps that have been transformed into sRBG space
187  ** allowing a linear lighting pipeline to be setup.
188  **
189  ** Default is 1.
190  */
192 
193 
194  /*l
195  *b Description:
196  **
197  ** Whether matrices that will be used as transforms in shaders should
198  ** be sent as a 4x3 matrix instead of 4x4. This should only be changed
199  ** if your video card is unable to use 4x4 matrices.
200  **
201  ** Default is 1.
202  */
205  /*l
206  *b Description:
207  **
208  ** Whether instancing should be used for rendering.
209  **
210  ** Default is 0.
211  */
213 
214  /*l
215  *b Description:
216  **
217  ** Instructs the instancing system to respect the graphics state switch
218  ** of geometry when constructing instance groups. Setting value to 0
219  ** while not graphically correct results in increased performance
220  **
221  ** Default is 1.
222  */
224 
226 
227 
228 #endif /* __GRAPHICS_INIT_OGL_H */
229 
230 
231 /*********************************************************************
232  ** Copyright (c) 1992-2016 VT MAK
233  ** All rights reserved.
234  *********************************************************************/
235 
float texture_anisotropic_filter
Determines the OpenGL anisotropic filtering level for textures.
Definition: graphics_init_ogl.h:73
int use_FBOs
Determines whether frame buffer object extensions are used.
Definition: graphics_init_ogl.h:93
struct bdiGraphicsInitOgl bdiGraphicsInitOgl
int use_textures
Determines whether textures will be applied.
Definition: graphics_init_ogl.h:27
Definition: graphics_init_ogl.h:21
int use_4x3_shader_matrices
Whether matrices that will be used as transforms in shaders should be sent as a 4x3 matrix instead of...
Definition: graphics_init_ogl.h:186
int use_cached_optimized_geometry
Sets whether .flt and .dae files will be loaded as geometry files optimized for DI-Guy use...
Definition: graphics_init_ogl.h:145
float polygon_offset_units
Sets the value passed to the units argument of the glPolygonOffset() function.
Definition: graphics_init_ogl.h:113
int use_materials
Determines whether materials will be applied.
Definition: graphics_init_ogl.h:33
GLenum texture_mag_filter
Determines the OpenGL magnification filtering method for textures.
Definition: graphics_init_ogl.h:47
int use_default_fire_weapon_intersection_function
Sets if a default shooting intersection function should be automatically set up.
Definition: graphics_init_ogl.h:124
GLenum texture_min_filter
Determines the OpenGL minification filtering method for textures.
Definition: graphics_init_ogl.h:65
int use_sRGB_corrected_textures
Sets whether SRGB textures should be used, these allow a relatively free lookup into texture maps tha...
Definition: graphics_init_ogl.h:176
int use_cached_compressed_textures
Sets whether compressed texture files should be generated from source uncompressed texture files in o...
Definition: graphics_init_ogl.h:166
int instancing_respect_graphics_state_switch
Instructs the instancing system to respect the graphics state switch of geometry when constructing in...
Definition: graphics_init_ogl.h:204
int use_shader_instancing
Whether instancing should be used for rendering.
Definition: graphics_init_ogl.h:194
float polygon_offset_factor
Sets the value passed to the factor argument of the glPolygonOffset() function.
Definition: graphics_init_ogl.h:104