DI-Guy SDK Documentation  13.1
bdiGraphicsInitGraphicsAPI.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, Graphics API
11  **
12  */
13 
14 #ifndef __bdiGraphicsInitGraphicsAPI_H
15 #define __bdiGraphicsInitGraphicsAPI_H
16 
18 
19 
20 /****************************************************************************/
21 typedef struct bdiGraphicsInitGraphicsAPI
22 {
23 
24  /*l
25  *b Description:
26  **
27  ** If vertex buffer data is not in array form, data will be packed
28  ** in interleaved form like so:
29  *>
30  ** vnt vnt vnt vnt vnt vnt
31  *<
32  ** Where 'v' represents three floats specifying vertex position, 'n'
33  ** represents three floats specifying normal direction, and 't'
34  ** represents two or more floats specifying texture indices.
35  **
36  ** If vertex buffer data is in array form, data will be
37  ** packed like:
38  *>
39  ** vvvvvv nnnnnn tttttt
40  *<
41  ** Where 'v' , 'n', and 't' have the same meanings as above.
42  **
43  ** The default is 0, do not use array format.
44  **
45  ** See the documentation for diguyGraphicsVertexFormat for
46  ** more information.
47  */
49 
50  /*l
51  *b Description:
52  **
53  ** This specifies the data type that indices in index buffer data
54  ** should use.
55  **
56  ** The default is DIGUY_GRAPHICS_INDEX_TYPE_USHORT.
57  */
59 
60  /*l
61  *b Description:
62  **
63  ** Determines whether shaders should be loaded and compiled.
64  **
65  ** Note the DI-Guy skinned appearances depend on shaders being
66  ** available and enabled.
67  **
68  ** Possible values are:
69  **
70  *a 0 - don't use shaders
71  *a 1 - do use shaders
72  **
73  ** Default is 1.
74  */
75  int use_shaders;
76 
77  /*l
78  *b Description:
79  **
80  ** Sets the shader language for loading shaders.
81  **
82  ** Possible values are:
83  **
84  *a DIGUY_GRAPHICS_SHADER_LANGUAGE_GLSL
85  *a DIGUY_GRAPHICS_SHADER_LANGUAGE_HLSL
86  **
87  ** Default is DIGUY_GRAPHICS_SHADER_LANGUAGE_GLSL
88  */
90 
91  /*l
92  *b Description:
93  **
94  ** Whether matrices that will be used as transforms in shaders
95  ** should be transposed from the DI-Guy default order.
96  **
97  ** This affects the data passed to/retrieved from the following DI-Guy
98  ** Graphics API functions:
99  **
100  *- - diguyGraphicsShaderProgram::bind_link_matrices()
101  *- - diguyGraphicsShape::get_shader_matrix_data()
102  **
103  ** Set to 1 (the default) to transpose, 0 to not.
104  **
105  *b Note: Change in 12.5
106  ** Open Scene Graph uses the transposed form.
107  ** OpenGL the transpose is done by the video card.
108  */
110 
111  /*l
112  *b Description:
113  **
114  ** Whether matrices that will be used as transforms in shaders
115  ** should be sent as 4x3 matrix instead of 4x4.
116  **
117  ** This affects the data passed to/retrieved from the following DI-Guy
118  ** Graphics API functions:
119  **
120  *- - diguyGraphicsShaderProgram::bind_link_matrices()
121  *- - diguyGraphicsShape::get_shader_matrix_data()
122  **
123  ** Set to 1 (the default) to send the more efficient structures.
124  **
125  *- - OpenGL uses 4x3 matrices.
126  *- - Open Scene Graph and directX use 4x4.
127  */
129 
130  /*l
131  *b Description:
132  **
133  ** Sets whether .flt and .dae files will be loaded as geometry
134  ** files optimized for DI-Guy use.
135  **
136  ** Generated files will be put into a subdirectory of the DI-Guy
137  ** geometry directory, and will be automatically updated as needed
138  ** (doesn't exist, or original file is newer).
139  **
140  ** The .bdg geometry format is a smaller, more efficient version of
141  ** the geometry data encoded in .flt and .dae files. It is an
142  ** internal DI-Guy format that is not directly supported by geometry
143  ** editing programs.
144  **
145  ** There is no quality trade-off in using optimized geometry files,
146  ** so it is recommended that they always be enabled.
147  **
148  ** Default is 1.
149  */
151 
152  /*l
153  *b Description:
154  **
155  ** Sets whether compressed texture files should be generated from
156  ** source uncompressed texture files in order to reduce texture
157  ** memory usage.
158  **
159  ** There is a quality trade-off when using compressed textures. If
160  ** there are too many undesired artifacts in the generated textures,
161  ** they should not be used.
162  **
163  ** Generated files will be put into a subdirectory of the DI-Guy
164  ** geometry directory, and will be automatically updated as needed
165  ** (doesn't exist, or original file is newer).
166  **
167  ** The compressed texture files will be in the .dds (DirectDraw
168  ** Surface) format.
169  **
170  ** Default is 0.
171  */
173 
174  /*l
175  *b Description:
176  **
177  ** Sets whether SRGB textures should be used, these allow a relatively
178  ** free lookup into texture maps that have been transformed into sRGB space
179  ** allowing a linear lighting pipeline to be setup. OSG 3.0 does not support
180  ** sRGB textures properly.
181  **
182  ** Default is 1.
183  */
185 
186  /*l
187  *b Description:
188  **
189  ** Sets whether DI-Guy draws characters by traversing links in a
190  ** recursive tree traversal, or in a flat linear traversal. Linear
191  ** drawing allows for easier culling and some additional performance
192  ** on simpler characters. Linear drawing is required for bump map
193  ** support.
194  **
195  ** Versions of DI-Guy prior to version 11 always used a recursive
196  ** traversal.
197  **
198  ** Default is 1.
199  */
201 
202  /*l
203  *b Description:
204  **
205  ** Experimental bits that allow the octtree to be built from
206  ** internally loaded scene objects and vehicles to calculate their
207  ** bounding box.
208  **
209  ** Default is 0 (off); set to 1 to turn on.
210  **
211  ** Note: this functionality requires that diguyGraphicsMesh::free_loader_memory()
212  ** is not called during the build process.
213  */
215 
217 
218  /*l
219  *b Description:
220  **
221  ** Experimental to support instancing.
222  **
223  ** Default is 0 (off).
224  */
226 
227  /*l
228  *b Description:
229  **
230  ** Experimental to support instancing.
231  **
232  ** Instructs the instancing system to respect the graphics state switch
233  ** of geometry when constructing instance groups. Setting value to 0
234  ** while not graphically correct results in increased performance
235  **
236  ** Default is 1 (on).
237  */
239 
241 
242 
243 #endif /* __bdiGraphicsInitGraphicsAPI_H */
244 
245 
246 /*********************************************************************
247  ** Copyright (c) 1992-2015 VT MAK
248  ** All rights reserved.
249  *********************************************************************/
250 
int use_array_format_for_vertex_buffer_data
If vertex buffer data is not in array form, data will be packed in interleaved form like so: ...
Definition: bdiGraphicsInitGraphicsAPI.h:44
int use_cached_optimized_geometry
Sets whether .flt and .dae files will be loaded as geometry files optimized for DI-Guy use...
Definition: bdiGraphicsInitGraphicsAPI.h:140
int characters_have_world_space_triangle_query
Experimental bits that allow the octtree to be built from internally loaded scene objects and vehicle...
Definition: bdiGraphicsInitGraphicsAPI.h:200
diguyGraphicsShaderLanguage
This enumeration lists supported shader languages.
Definition: diguy_constants.h:1789
Definition: bdiGraphicsInitGraphicsAPI.h:18
struct bdiGraphicsInitGraphicsAPI bdiGraphicsInitGraphicsAPI
int use_shader_instancing
Experimental to support instancing.
Definition: bdiGraphicsInitGraphicsAPI.h:210
bool use_4x3_shader_matrices
Whether matrices that will be used as transforms in shaders should be sent as 4x3 matrix instead of 4...
Definition: bdiGraphicsInitGraphicsAPI.h:119
int use_sRGB_corrected_textures
Sets whether SRGB textures should be used, these allow a relatively free lookup into texture maps tha...
Definition: bdiGraphicsInitGraphicsAPI.h:172
int instancing_respect_graphics_state_switch
Experimental to support instancing.
Definition: bdiGraphicsInitGraphicsAPI.h:222
int use_shaders
Determines whether shaders should be loaded and compiled.
Definition: bdiGraphicsInitGraphicsAPI.h:69
diguyGraphicsShaderLanguage shader_language
Sets the shader language for loading shaders.
Definition: bdiGraphicsInitGraphicsAPI.h:82
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: bdiGraphicsInitGraphicsAPI.h:187
diguyGraphicsIndexType
This enumeration lists the types that indices stored in index buffer data might have.
Definition: diguyGraphicsVertexFormats.h:138
int transpose_shader_matrices
Whether matrices that will be used as transforms in shaders should be transposed from the DI-Guy defa...
Definition: bdiGraphicsInitGraphicsAPI.h:101
diguyGraphicsIndexType default_vertex_type
This specifies the data type that indices in index buffer data should use.
Definition: bdiGraphicsInitGraphicsAPI.h:53
int use_cached_compressed_textures
Sets whether compressed texture files should be generated from source uncompressed texture files in o...
Definition: bdiGraphicsInitGraphicsAPI.h:161
int scene_objects_have_world_space_triangle_query
Definition: bdiGraphicsInitGraphicsAPI.h:202