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