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