DI-Guy SDK Documentation  13.8
graphics_init_ogl.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2024 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
6 /*********************************************************************
7  **
8  *t DI-Guy Graphics Init Structure, OpenGL
9  **
10  */
11 
12 #ifndef __GRAPHICS_INIT_OGL_H
13 #define __GRAPHICS_INIT_OGL_H
14 
15 #ifdef _WIN32
16 #include <windows.h>
17 #endif
18 #include <GL/gl.h>
19 
20 
28 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 
85  /*l
86  *b Description:
87  **
88  ** Determines whether frame buffer object extensions are used.
89  ** In some cases using frame buffer objects can improve performance
90  ** of intersection testing.
91  **
92  *b This currently only has an effect on Win32 platforms.
93  **
94  ** There is a known problem with some graphics cards that using
95  ** frame buffer objects leads to a program crash.
96  **
97  ** Possible values are:
98  **
99  *a 0 - don't use frame buffer object extensions
100  *a 1 - do use frame buffer object extensions
101  **
102  ** Default is 0.
103  */
104  int use_FBOs;
105 
106 
107  /*l
108  *b Description:
109  **
110  ** Sets the value passed to the factor argument of the
111  ** glPolygonOffset() function. This function is used when
112  ** rendering polygon subfaces, which are commonly used for
113  ** edge highlighting and decals on signs.
114  **
115  ** Default is -1.0.
116  */
117  float polygon_offset_factor;
119  /*l
120  *b Description:
121  **
122  ** Sets the value passed to the units argument of the
123  ** glPolygonOffset() function.
124  **
125  ** Default is -1.0.
126  */
127  float polygon_offset_units;
128 
129  /*l
130  *b Description:
131  **
132  ** Sets if a default shooting intersection function should be
133  ** automatically set up. See
134  ** diguyScenario::set_default_fire_weapon_intersection_function()
135  ** for more details.
136  **
137  ** Default is 1.
138  */
140 
141  /*l
142  *b Description:
143  **
144  ** Sets whether .flt and .dae files will be loaded as geometry
145  ** files optimized for DI-Guy use.
146  **
147  ** Generated files will be put into a subdirectory of the DI-Guy
148  ** geometry directory, and will be automatically updated as needed
149  ** (doesn't exist, or original file is newer).
150  **
151  ** The .bdg geometry format is a smaller, more efficient version of
152  ** the geometry data encoded in .flt and .dae files. It is an
153  ** internal DI-Guy format that is not directly supported by geometry
154  ** editing programs.
155  **
156  ** There is no quality trade-off in using optimized geometry files,
157  ** so it is recommended that they always be enabled.
158  **
159  ** Default is 1.
160  */
162 
163  /*l
164  *b Description:
165  **
166  ** Sets whether compressed texture files should be generated from
167  ** source uncompressed texture files in order to reduce texture
168  ** memory usage.
169  **
170  ** There is a quality trade-off when using compressed textures. If
171  ** there are too many undesired artifacts in the generated textures,
172  ** they should not be used.
173  **
174  ** Generated files will be put into a subdirectory of the DI-Guy
175  ** geometry directory, and will be automatically updated as needed
176  ** (doesn't exist, or original file is newer).
177  **
178  ** The compressed texture files will be in the .dds (DirectDraw
179  ** Surface) format.
180  **
181  ** Default is 1.
182  */
184 
185  /*l
186  *b Description:
187  **
188  ** Sets whether SRGB textures should be used, these allow a relatively
189  ** free lookup into texture maps that have been transformed into sRBG space
190  ** allowing a linear lighting pipeline to be setup.
191  **
192  ** Default is 1.
193  */
195 
196 
197  /*l
198  *b Description:
199  **
200  ** Whether matrices that will be used as transforms in shaders should
201  ** be sent as a 4x3 matrix instead of 4x4. This should only be changed
202  ** if your video card is unable to use 4x4 matrices.
203  **
204  ** Default is 1.
205  */
207 
208  /*l
209  *b Description:
210  **
211  ** Whether instancing should be used for rendering.
212  **
213  ** Default is 0.
214  */
216 
217  /*l
218  *b Description:
219  **
220  ** Instructs the instancing system to respect the graphics state switch
221  ** of geometry when constructing instance groups. Setting value to 0
222  ** while not graphically correct results in increased performance
223  **
224  ** Default is 1.
225  */
227 
228  /*l
229  *b Description:
230  **
231  ** Instructs the initializing system to pop up a Qt based dialog box for setting up licensing
232  **
233  ** Default is 1.
234  */
235 
237 
238 
239 };
240 
241 
242 #endif /* __GRAPHICS_INIT_OGL_H */
243 
244 
245 /*********************************************************************
246  ** Copyright (c) 1992-2022 MAK Technologies, Inc.
247  ** All rights reserved.
248  *********************************************************************/
249 
float texture_anisotropic_filter
Determines the OpenGL anisotropic filtering level for textures.
Definition: graphics_init_ogl.h:78
int use_FBOs
Determines whether frame buffer object extensions are used.
Definition: graphics_init_ogl.h:98
int use_textures
Determines whether textures will be applied.
Definition: graphics_init_ogl.h:32
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:218
The initialization structure for the built-in opengl rendering engine.
Definition: graphics_init_ogl.h:26
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:191
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:150
float polygon_offset_units
Sets the value passed to the units argument of the glPolygonOffset() function.
Definition: graphics_init_ogl.h:118
int use_materials
Determines whether materials will be applied.
Definition: graphics_init_ogl.h:38
GLenum texture_mag_filter
Determines the OpenGL magnification filtering method for textures.
Definition: graphics_init_ogl.h:52
int use_default_fire_weapon_intersection_function
Sets if a default shooting intersection function should be automatically set up.
Definition: graphics_init_ogl.h:129
GLenum texture_min_filter
Determines the OpenGL minification filtering method for textures.
Definition: graphics_init_ogl.h:70
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:181
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:171
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:209
int use_shader_instancing
Whether instancing should be used for rendering.
Definition: graphics_init_ogl.h:199
float polygon_offset_factor
Sets the value passed to the factor argument of the glPolygonOffset() function.
Definition: graphics_init_ogl.h:109