C++ SDK Reference  12.5
 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-2013 Boston Dynamics
4  * ALL RIGHTS RESERVED.
5  *
6  * These coded instructions, statements, and computer programs
7  * contain unpublished proprietary information of Boston Dynamics
8  * and are protected by Copyright Laws of the United States.
9  * They may not be used, duplicated, or disclosed in any form, in
10  * whole or in part, without the prior written consent from Boston
11  * Dynamics.
12  *
13  * RESTRICTED RIGHTS LEGEND
14  * Use, duplication, or disclosure by the government is subject
15  * to restrictions as set forth in FAR 52.227.19(c)(2) or
16  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
17  * Computer Software clause at DFARS 252.227-7013 and/or in
18  * similar or successor clauses in the FAR, or the DOD or NASA
19  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
20  * Commercial Computer Software--Restricted Rights at 48 CFR
21  * 52.227-19, as applicable. Unpublished-rights reserved under
22  * the Copyright Laws of the United States.
23  * Contractor/Manufacturer is:
24  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
25  */
26 
27 
28 /*********************************************************************
29  **
30  *t DI-Guy Graphics Init Structure, OpenGL
31  **
32  */
33 
34 #ifndef __GRAPHICS_INIT_OGL_H
35 #define __GRAPHICS_INIT_OGL_H
36 
37 #ifdef _WIN32
38 #include <windows.h>
39 #endif
40 #ifdef __APPLE__
41 #include <OpenGL/gl.h>
42 #else
43 #include <GL/gl.h>
44 #endif
45 
46 
47 /****************************************************************************/
48 typedef struct bdiGraphicsInitOgl
49 {
50  /*l
51  *b Description:
52  **
53  ** Determines whether textures will be applied. Default is 1.
54  */
55  int use_textures;
56 
57  /*l
58  *b Description:
59  **
60  ** Determines whether materials will be applied. Default is 1.
61  */
62  int use_materials;
63 
64  /*l
65  *b Description:
66  **
67  ** Determines whether character, link, and shape indices will be
68  ** pushed onto the OpenGL name stack when drawing.
69  **
70  ** Possible values are:
71  **
72  *a 1 - <DIGUY_CLASSID_*,index> pairs will be pushed onto the
73  *a OpenGL name stack when drawing
74  *a 0 - the OpenGL name stack will be unmodified
75  **
76  ** Default is 0.
77  */
78  int use_name_stack;
79 
80  /*l
81  *b Description:
82  **
83  ** Determines the OpenGL magnification filtering method
84  ** for textures. Should be one of:
85  **
86  *e GL_NEAREST
87  *e GL_LINEAR
88  **
89  ** Default is GL_LINEAR
90  */
91  GLenum texture_mag_filter;
92 
93  /*l
94  *b Description:
95  **
96  ** Determines the OpenGL minification filtering method
97  ** for textures. Should be one of:
98  **
99  *e GL_NEAREST
100  *e GL_LINEAR
101  *e GL_NEAREST_MIPMAP_NEAREST
102  *e GL_NEAREST_MIPMAP_LINEAR
103  *e GL_LINEAR_MIPMAP_NEAREST
104  *e GL_LINEAR_MIPMAP_LINEAR
105  **
106  ** Default is GL_LINEAR_MIPMAP_LINEAR
107  */
108  GLenum texture_min_filter;
109 
110  /*l
111  *b Description:
112  **
113  ** Deprecated; Boston Dynamics no longer uses the MG-API library,
114  ** so this setting is not used. It is left here in order to not
115  ** break existing code.
116  */
118 
119  /*l
120  *b Description:
121  **
122  ** Determines whether vertex buffer object extensions are used.
123  ** In some cases using vertex buffer objects rather than display
124  ** lists can improve performance.
125  **
126  ** Possible values are:
127  **
128  *a 0 - don't use vertex buffer object extensions
129  *a 1 - do use vertex buffer object extensions
130  **
131  ** Default is 1.
132  */
133  int use_VBOs;
134 
135  /*l
136  *b Description:
137  **
138  ** Determines whether frame buffer object extensions are used.
139  ** In some cases using frame buffer objects can improve performance
140  ** of intersection testing.
141  **
142  *b This currently only has an effect on Win32 platforms.
143  **
144  ** There is a known problem with some graphics cards that using
145  ** frame buffer objects leads to a program crash.
146  **
147  ** Possible values are:
148  **
149  *a 0 - don't use frame buffer object extensions
150  *a 1 - do use frame buffer object extensions
151  **
152  ** Default is 0.
153  */
154  int use_FBOs;
155 
156  /*l
157  *b Description:
158  **
159  ** Determines whether shaders should be loaded and compiled.
160  **
161  ** Note the DI-Guy skinned appearances depend on shaders being
162  ** available and enabled.
163  **
164  *b This currently only has an effect on Win32 platforms.
165  **
166  ** There is a known problem with some graphics cards using GLSL
167  ** possibly causing a crash.
168  **
169  ** Possible values are:
170  **
171  *a 0 - don't use shaders
172  *a 1 - do use shaders
173  **
174  ** Default is 1.
175  */
176  int use_shaders;
177 
178  /*l
179  *b Description:
180  **
181  ** Determines whether the multitexture extension is used.
182  **
183  ** Possible values are:
184  **
185  *a 0 - don't use multitexture extensions
186  *a 1 - do use multitexture extensions
187  **
188  ** Default is 0.
189  */
191 
192  /*l
193  *b Description:
194  **
195  ** Sets which texture unit is used for applying textures.
196  ** Should be set to an integer, *not* to a GL enumeration.
197  **
198  ** Possible values are:
199  **
200  *a 0 - use GL_TEXTURE0
201  *a 1 - use GL_TEXTURE1
202  *a 2 - use GL_TEXTURE2
203  *a 3 - use GL_TEXTURE3
204  **
205  ** Default is 0, or texture unit GL_TEXTURE0.
206  */
207  int texture_unit;
209  /*l
210  *b Description:
211  **
212  ** Sets the value passed to the factor argument of the
213  ** glPolygonOffset() function. This function is used when
214  ** rendering polygon subfaces, which are commonly used for
215  ** edge highlighting and decals on signs.
216  **
217  ** Default is -1.0.
218  */
219  float polygon_offset_factor;
220 
221  /*l
222  *b Description:
223  **
224  ** Sets the value passed to the units argument of the
225  ** glPolygonOffset() function.
226  **
227  ** Default is -1.0.
228  */
229  float polygon_offset_units;
230 
231  /*l
232  *b Description:
233  **
234  ** Sets if a default shooting intersection function should be
235  ** automatically set up. See
236  ** diguyScenario::set_default_fire_weapon_intersection_function()
237  ** for more details.
238  **
239  ** Default is 1.
240  */
242 
243  /*l
244  *b Description:
245  **
246  ** Sets whether .flt and .dae files will be loaded as geometry
247  ** files optimized for DI-Guy use.
248  **
249  ** Generated files will be put into a subdirectory of the DI-Guy
250  ** geometry directory, and will be automatically updated as needed
251  ** (doesn't exist, or original file is newer).
252  **
253  ** The .bdg geometry format is a smaller, more efficient version of
254  ** the geometry data encoded in .flt and .dae files. It is an
255  ** internal DI-Guy format that is not directly supported by geometry
256  ** editing programs.
257  **
258  ** There is no quality trade-off in using optimized geometry files,
259  ** so it is recommended that they always be enabled.
260  **
261  ** Default is 1.
262  */
264 
265  /*l
266  *b Description:
267  **
268  ** Sets whether compressed texture files should be generated from
269  ** source uncompressed texture files in order to reduce texture
270  ** memory usage.
271  **
272  ** There is a quality trade-off when using compressed textures. If
273  ** there are too many undesired artifacts in the generated textures,
274  ** they should not be used.
275  **
276  ** Generated files will be put into a subdirectory of the DI-Guy
277  ** geometry directory, and will be automatically updated as needed
278  ** (doesn't exist, or original file is newer).
279  **
280  ** The compressed texture files will be in the .dds (DirectDraw
281  ** Surface) format.
282  **
283  ** Default is 1.
284  */
286 
287  /*l
288  *b Description:
289  **
290  ** Sets whether SRGB textures should be used, these allow a relatively
291  ** free lookup into texture maps that have been transformed into sRBG space
292  ** allowing a linear lighting pipeline to be setup.
293  **
294  ** Default is 1.
295  */
297 
298  /*l
299  *b Description:
300  **
301  ** Sets whether DI-Guy draws characters by traversing links in a
302  ** recursive tree traversal, or in a flat linear traversal. Linear
303  ** drawing allows for easier culling and some additional performance
304  ** on simpler characters. Linear traversal is required for some
305  ** advanced lighting shaders.
306  **
307  ** Versions of DI-Guy prior to version 11 always used a recursive
308  ** traversal.
309  **
310  ** Default is 1.
311  */
313 
314  /*l
315  *b Description:
316  **
317  ** Whether matrices that will be used as transforms in shaders should
318  ** be sent as a 4x3 matrix instead of 4x4. This should only be changed
319  ** if your video card is unable to use 4x4 matrices.
320  **
321  ** Default is 1.
322  */
324 
326 
327 
328 #endif /* __GRAPHICS_INIT_OGL_H */
329 
330 
331 /*
332  * Copyright (C) 1992-2013 Boston Dynamics
333  * ALL RIGHTS RESERVED.
334  *
335  * These coded instructions, statements, and computer programs
336  * contain unpublished proprietary information of Boston Dynamics
337  * and are protected by Copyright Laws of the United States.
338  * They may not be used, duplicated, or disclosed in any form, in
339  * whole or in part, without the prior written consent from Boston
340  * Dynamics.
341  *
342  * RESTRICTED RIGHTS LEGEND
343  * Use, duplication, or disclosure by the government is subject
344  * to restrictions as set forth in FAR 52.227.19(c)(2) or
345  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
346  * Computer Software clause at DFARS 252.227-7013 and/or in
347  * similar or successor clauses in the FAR, or the DOD or NASA
348  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
349  * Commercial Computer Software--Restricted Rights at 48 CFR
350  * 52.227-19, as applicable. Unpublished-rights reserved under
351  * the Copyright Laws of the United States.
352  * Contractor/Manufacturer is:
353  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
354  */
355