DI-Guy C++ SDK Reference  13.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diguy_graphics_api.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  *t DI-Guy API, Info Graphics Module
10  **
11  *b Link against: libdiguy_graphics_api
12  */
13 
14 #ifndef __diguy_graphics_api_H
15 #define __diguy_graphics_api_H
16 
17 #include <diguy_api.h>
18 #include <diguy_typedefs.h>
20 
21 // these typedefs have actually been moved to diguy_typedefs.h but very few files depend on this
22 // header file so it's not worth breaking backwards compatibility to remove these.
23 #include <diguyGraphicsLink.h> // for diguyGraphicsLinkCreateFunc
24 #include <diguyGraphicsShape.h> // for diguyGraphicsShapeCreateFunc
25 #include <diguyGraphicsFile.h> // for diguyGraphicsFileCreateFunc
26 #include <diguyGraphicsState.h> // for diguyGraphicsStateCreateFunc
27 #include <diguyGraphicsMaterial.h> // for diguyGraphicsMaterialCreateFunc
28 #include <diguyGraphicsTexture.h> // for diguyGraphicsTextureCreateFunc
29 #include <diguyGraphicsMesh.h> // for diguyGraphicsMeshCreateFunc
30 #include <diguyGraphicsShaderProgram.h> // for diguyGraphicsShaderProgramCreateFunc
31 #include <diguyGraphicsShaderInstance.h> // for diguyGraphicsShaderInstanceCreateFunc
32 #include <diguyGraphicsInstanceGroup.h> // for diguyGraphicsInstanceGroupCreateFunc
33 
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 
41 /*****************************************************************************/
48 /*l
49  *b Description:
50  **
51  ** This function initializes the DI-Guy Runtime API for accessing
52  ** information about DI-Guy graphics and geometry.
53  **
54  ** Use diguy_graphics_get_defaults() to fill out the init structure
55  ** before changing specific entries.
56  **
57  *b Arguments:
58  **
59  *a init - pointer to type bdiGraphicsInitGraphicsAPI; passing NULL
60  *a will cause defaults to be used for all values
61  **
62  *b Returns:
63  **
64  ** 0 on success, non-zero error code on failure
65  **
66  ** Refer to diguy_constants.h for error code values.
67  **
68  ** \ingroup diguyGraphicsAPI
69  */
70 BDI_DECLSPEC_diguy_graphics int
72 
73 /*l
74  *b Description:
75  **
76  ** Fills out the init structure with default values. Selected entries
77  ** can then be changed before calling diguy_graphics_initialize().
78  **
79  ** The default values are:
80  *- - init->use_array_format_for_vertex_buffer_data = 0;
81  *- - init->default_vertex_type = DIGUY_GRAPHICS_INDEX_TYPE_USHORT;
82  *- - init->use_shaders = 1;
83  *- - init->shader_language = DIGUY_GRAPHICS_SHADER_LANGUAGE_GLSL;
84  *- - init->transpose_shader_matrices = 0;
85  *- - init->use_4x3_shader_matrices = 1;
86  *- - init->use_cached_optimized_geometry = 1;
87  *- - init->use_cached_compressed_textures = 1;
88  *- - init->use_sRGB_corrected_textures = 1;
89  *- - init->characters_have_world_space_triangle_query = 0;
90  *- - init->scene_objects_have_world_space_triangle_query = 0;
91  *- - init->use_linear_traversal_draw = 1;
92  **
93  *b Arguments:
94  **
95  *a init - pointer to type bdiGraphicsInitGraphicsAPI
96  **
97  *b Returns:
98  **
99  ** 0 on success, -1 on failure
100  */
101 BDI_DECLSPEC_diguy_graphics int
103 
104 /*l
105  *b Description:
106  **
107  ** Fills out the init structure with default OSG values. Selected entries
108  ** can then be changed before calling diguy_graphics_initialize().
109  **
110  ** The differences for the default values are:
111  *- - init->transpose_shader_matrices = 1;
112  *- - init->use_4x3_shader_matrices = 0;
113  *- - init->use_sRGB_corrected_textures = 0;
114  **
115  *b Arguments:
116  **
117  *a init - pointer to type bdiGraphicsInitGraphicsAPI
118  **
119  *b Returns:
120  **
121  ** 0 on success, -1 on failure
122  */
123 BDI_DECLSPEC_diguy_graphics int
125 
126 /*l
127  *b Description:
128  **
129  ** Fills out the init structure with default values. Selected entries
130  ** can then be changed before calling diguy_graphics_initialize().
131  **
132  ** The differences for the default values are:
133  *- - init->transpose_shader_matrices = 1
134  *- - init->use_4x3_shader_matrices = 0
135  *- - init->shader_language = DIGUY_GRAPHICS_SHADER_LANGUAGE_HLSL
136  **
137  *b Arguments:
138  **
139  *a init - pointer to type bdiGraphicsInitGraphicsAPI
140  **
141  *b Returns:
142  **
143  ** 0 on success, -1 on failure
144  */
145 
146 BDI_DECLSPEC_diguy_graphics int
148 
149 /*l
150  *b Description:
151  **
152  ** This function turns far position rendering on or off. It must be
153  ** called after diguy_graphics_initialize().
154  **
155  *b Arguments:
156  **
157  *a flag - pass 1 to turn far positions on, 0 to turn them off
158  **
159  */
160 BDI_DECLSPEC_diguy_graphics
162 
163 /*l
164  *b Description:
165  **
166  ** This function gets the status of far position rendering.
167  ** It can only be called after diguy_graphics_initialize().
168  **
169  *b Returns:
170  **
171  ** 1 if far position rendering is on, 0 if not
172  **
173  */
174 BDI_DECLSPEC_diguy_graphics
176 
177 
178 /*****************************************************************************/
189 BDI_DECLSPEC_diguy_graphics int
191 
195 BDI_DECLSPEC_diguy_graphics int
197 
201 BDI_DECLSPEC_diguy_graphics int
203 
207 BDI_DECLSPEC_diguy_graphics int
209 
213 BDI_DECLSPEC_diguy_graphics int
215 
219 BDI_DECLSPEC_diguy_graphics int
221 
225 BDI_DECLSPEC_diguy_graphics int
227 
231 BDI_DECLSPEC_diguy_graphics int
233 
237 BDI_DECLSPEC_diguy_graphics int
239 
243 BDI_DECLSPEC_diguy_graphics int
245 
249 BDI_DECLSPEC_diguy_graphics int
251 
255 BDI_DECLSPEC_diguy_graphics int
257 
258 #ifdef __cplusplus
259 }
260 #endif
261 
262 
263 #endif /* __diguy_graphics_api_H */
264 
265 
266 /*********************************************************************
267  ** Copyright (c) 1992-2014 VT MAK
268  ** All rights reserved.
269  *********************************************************************/
270