DI-Guy SDK Documentation  13.1
graphics_init_ogl.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2015 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 #ifdef __APPLE__
21 #include <OpenGL/gl.h>
22 #else
23 #include <GL/gl.h>
24 #endif
25 
26 
27 /****************************************************************************/
28 typedef struct bdiGraphicsInitOgl
29 {
30  /*l
31  *b Description:
32  **
33  ** Determines whether textures will be applied. Default is 1.
34  */
35  int use_textures;
36 
37  /*l
38  *b Description:
39  **
40  ** Determines whether materials will be applied. Default is 1.
41  */
42  int use_materials;
43 
44 
45  /*l
46  *b Description:
47  **
48  ** Determines the OpenGL magnification filtering method
49  ** for textures. Should be one of:
50  **
51  *e GL_NEAREST
52  *e GL_LINEAR
53  **
54  ** Default is GL_LINEAR
55  */
56  GLenum texture_mag_filter;
57 
58  /*l
59  *b Description:
60  **
61  ** Determines the OpenGL minification filtering method
62  ** for textures. Should be one of:
63  **
64  *e GL_NEAREST
65  *e GL_LINEAR
66  *e GL_NEAREST_MIPMAP_NEAREST
67  *e GL_NEAREST_MIPMAP_LINEAR
68  *e GL_LINEAR_MIPMAP_NEAREST
69  *e GL_LINEAR_MIPMAP_LINEAR
70  **
71  ** Default is GL_LINEAR_MIPMAP_LINEAR
72  */
73  GLenum texture_min_filter;
74 
75  /*l
76  *b Description:
77  **
78  ** Determines the OpenGL anisotropic filtering level for textures.
79  ** Should be a power of 2 typically up to 16.
80  ** Default is 0.0f
81  */
83 
84  /*l
85  *b Description:
86  **
87  ** Deprecated; Boston Dynamics no longer uses the MG-API library,
88  ** so this setting is not used. It is left here in order to not
89  ** break existing code.
90  */
92 
93  /*l
94  *b Description:
95  **
96  ** Determines whether vertex buffer object extensions are used.
97  ** In some cases using vertex buffer objects rather than display
98  ** lists can improve performance.
99  **
100  ** Possible values are:
101  **
102  *a 0 - don't use vertex buffer object extensions
103  *a 1 - do use vertex buffer object extensions
104  **
105  ** Default is 1.
106  */
107  int use_VBOs;
108 
109  /*l
110  *b Description:
111  **
112  ** Determines whether frame buffer object extensions are used.
113  ** In some cases using frame buffer objects can improve performance
114  ** of intersection testing.
115  **
116  *b This currently only has an effect on Win32 platforms.
117  **
118  ** There is a known problem with some graphics cards that using
119  ** frame buffer objects leads to a program crash.
120  **
121  ** Possible values are:
122  **
123  *a 0 - don't use frame buffer object extensions
124  *a 1 - do use frame buffer object extensions
125  **
126  ** Default is 0.
127  */
128  int use_FBOs;
129 
130  /*l
131  *b Description:
132  **
133  ** Determines whether shaders should be loaded and compiled.
134  **
135  ** Note the DI-Guy skinned appearances depend on shaders being
136  ** available and enabled.
137  **
138  *b This currently only has an effect on Win32 platforms.
139  **
140  ** There is a known problem with some graphics cards using GLSL
141  ** possibly causing a crash.
142  **
143  ** Possible values are:
144  **
145  *a 0 - don't use shaders
146  *a 1 - do use shaders
147  **
148  ** Default is 1.
149  */
150  int use_shaders;
151 
152  /*l
153  *b Description:
154  **
155  ** Determines whether the multitexture extension is used.
156  **
157  ** Possible values are:
158  **
159  *a 0 - don't use multitexture extensions
160  *a 1 - do use multitexture extensions
161  **
162  ** Default is 0.
163  */
165 
166  /*l
167  *b Description:
168  **
169  ** Sets which texture unit is used for applying textures.
170  ** Should be set to an integer, *not* to a GL enumeration.
171  **
172  ** Possible values are:
173  **
174  *a 0 - use GL_TEXTURE0
175  *a 1 - use GL_TEXTURE1
176  *a 2 - use GL_TEXTURE2
177  *a 3 - use GL_TEXTURE3
178  **
179  ** Default is 0, or texture unit GL_TEXTURE0.
180  */
182 
183  /*l
184  *b Description:
185  **
186  ** Sets the value passed to the factor argument of the
187  ** glPolygonOffset() function. This function is used when
188  ** rendering polygon subfaces, which are commonly used for
189  ** edge highlighting and decals on signs.
190  **
191  ** Default is -1.0.
192  */
193  float polygon_offset_factor;
194 
195  /*l
196  *b Description:
197  **
198  ** Sets the value passed to the units argument of the
199  ** glPolygonOffset() function.
200  **
201  ** Default is -1.0.
202  */
203  float polygon_offset_units;
204 
205  /*l
206  *b Description:
207  **
208  ** Sets if a default shooting intersection function should be
209  ** automatically set up. See
210  ** diguyScenario::set_default_fire_weapon_intersection_function()
211  ** for more details.
212  **
213  ** Default is 1.
214  */
216 
217  /*l
218  *b Description:
219  **
220  ** Sets whether .flt and .dae files will be loaded as geometry
221  ** files optimized for DI-Guy use.
222  **
223  ** Generated files will be put into a subdirectory of the DI-Guy
224  ** geometry directory, and will be automatically updated as needed
225  ** (doesn't exist, or original file is newer).
226  **
227  ** The .bdg geometry format is a smaller, more efficient version of
228  ** the geometry data encoded in .flt and .dae files. It is an
229  ** internal DI-Guy format that is not directly supported by geometry
230  ** editing programs.
231  **
232  ** There is no quality trade-off in using optimized geometry files,
233  ** so it is recommended that they always be enabled.
234  **
235  ** Default is 1.
236  */
238 
239  /*l
240  *b Description:
241  **
242  ** Sets whether compressed texture files should be generated from
243  ** source uncompressed texture files in order to reduce texture
244  ** memory usage.
245  **
246  ** There is a quality trade-off when using compressed textures. If
247  ** there are too many undesired artifacts in the generated textures,
248  ** they should not be used.
249  **
250  ** Generated files will be put into a subdirectory of the DI-Guy
251  ** geometry directory, and will be automatically updated as needed
252  ** (doesn't exist, or original file is newer).
253  **
254  ** The compressed texture files will be in the .dds (DirectDraw
255  ** Surface) format.
256  **
257  ** Default is 1.
258  */
260 
261  /*l
262  *b Description:
263  **
264  ** Sets whether SRGB textures should be used, these allow a relatively
265  ** free lookup into texture maps that have been transformed into sRBG space
266  ** allowing a linear lighting pipeline to be setup.
267  **
268  ** Default is 1.
269  */
271 
272  /*l
273  *b Description:
274  **
275  ** Sets whether DI-Guy draws characters by traversing links in a
276  ** recursive tree traversal, or in a flat linear traversal. Linear
277  ** drawing allows for easier culling and some additional performance
278  ** on simpler characters. Linear traversal is required for some
279  ** advanced lighting shaders.
280  **
281  ** Versions of DI-Guy prior to version 11 always used a recursive
282  ** traversal.
283  **
284  ** Default is 1.
285  */
287 
288  /*l
289  *b Description:
290  **
291  ** Whether matrices that will be used as transforms in shaders should
292  ** be sent as a 4x3 matrix instead of 4x4. This should only be changed
293  ** if your video card is unable to use 4x4 matrices.
294  **
295  ** Default is 1.
296  */
298 
299  /*l
300  *b Description:
301  **
302  ** Whether instancing should be used for rendering.
303  **
304  ** Default is 0.
305  */
307 
308  /*l
309  *b Description:
310  **
311  ** Instructs the instancing system to respect the graphics state switch
312  ** of geometry when constructing instance groups. Setting value to 0
313  ** while not graphically correct results in increased performance
314  **
315  ** Default is 1.
316  */
318 
320 
321 
322 #endif /* __GRAPHICS_INIT_OGL_H */
323 
324 
325 /*********************************************************************
326  ** Copyright (c) 1992-2015 VT MAK
327  ** All rights reserved.
328  *********************************************************************/
329 
float texture_anisotropic_filter
Determines the OpenGL anisotropic filtering level for textures.
Definition: graphics_init_ogl.h:77
int call_mgInit_and_mgExit
Deprecated; Boston Dynamics no longer uses the MG-API library, so this setting is not used...
Definition: graphics_init_ogl.h:85
int use_FBOs
Determines whether frame buffer object extensions are used.
Definition: graphics_init_ogl.h:120
int use_VBOs
Determines whether vertex buffer object extensions are used.
Definition: graphics_init_ogl.h:100
struct bdiGraphicsInitOgl bdiGraphicsInitOgl
int use_textures
Determines whether textures will be applied.
Definition: graphics_init_ogl.h:31
Definition: graphics_init_ogl.h:25
int use_multitexture_extension
Determines whether the multitexture extension is used.
Definition: graphics_init_ogl.h:154
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:278
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:222
float polygon_offset_units
Sets the value passed to the units argument of the glPolygonOffset() function.
Definition: graphics_init_ogl.h:190
int use_materials
Determines whether materials will be applied.
Definition: graphics_init_ogl.h:37
GLenum texture_mag_filter
Determines the OpenGL magnification filtering method for textures.
Definition: graphics_init_ogl.h:51
int use_linear_traversal_draw
Sets whether DI-Guy draws characters by traversing links in a recursive tree traversal, or in a flat linear traversal.
Definition: graphics_init_ogl.h:268
int use_default_fire_weapon_intersection_function
Sets if a default shooting intersection function should be automatically set up.
Definition: graphics_init_ogl.h:201
GLenum texture_min_filter
Determines the OpenGL minification filtering method for textures.
Definition: graphics_init_ogl.h:69
int use_shaders
Determines whether shaders should be loaded and compiled.
Definition: graphics_init_ogl.h:141
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:253
int texture_unit
Sets which texture unit is used for applying textures.
Definition: graphics_init_ogl.h:170
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:243
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:296
int use_shader_instancing
Whether instancing should be used for rendering.
Definition: graphics_init_ogl.h:286
float polygon_offset_factor
Sets the value passed to the factor argument of the glPolygonOffset() function.
Definition: graphics_init_ogl.h:181