Mercurial > hg > Members > e075717
comparison o3d/converter/Library/Frameworks/Cg.framework/Versions/1.0/Headers/cgGL.h @ 34:3e86f61e519f
add o3d files and COLLADA converter
author | mayaguwa@mayah.st.ie.u-ryukyu.ac.jp |
---|---|
date | Sun, 01 Aug 2010 04:45:30 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
33:1b9493547449 | 34:3e86f61e519f |
---|---|
1 /* | |
2 * | |
3 * Copyright (c) 2002-2009, NVIDIA Corporation. | |
4 * | |
5 * | |
6 * | |
7 * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration | |
8 * of your agreement to the following terms, and your use, installation, | |
9 * modification or redistribution of this NVIDIA software constitutes | |
10 * acceptance of these terms. If you do not agree with these terms, please do | |
11 * not use, install, modify or redistribute this NVIDIA software. | |
12 * | |
13 * | |
14 * | |
15 * In consideration of your agreement to abide by the following terms, and | |
16 * subject to these terms, NVIDIA grants you a personal, non-exclusive license, | |
17 * under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA | |
18 * Software"), to use, reproduce, modify and redistribute the NVIDIA | |
19 * Software, with or without modifications, in source and/or binary forms; | |
20 * provided that if you redistribute the NVIDIA Software, you must retain the | |
21 * copyright notice of NVIDIA, this notice and the following text and | |
22 * disclaimers in all such redistributions of the NVIDIA Software. Neither the | |
23 * name, trademarks, service marks nor logos of NVIDIA Corporation may be used | |
24 * to endorse or promote products derived from the NVIDIA Software without | |
25 * specific prior written permission from NVIDIA. Except as expressly stated | |
26 * in this notice, no other rights or licenses express or implied, are granted | |
27 * by NVIDIA herein, including but not limited to any patent rights that may be | |
28 * infringed by your derivative works or by other works in which the NVIDIA | |
29 * Software may be incorporated. No hardware is licensed hereunder. | |
30 * | |
31 * | |
32 * | |
33 * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT | |
34 * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING | |
35 * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, | |
36 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION | |
37 * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. | |
38 * | |
39 * | |
40 * | |
41 * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, | |
42 * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST | |
43 * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
44 * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, | |
45 * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, | |
46 * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING | |
47 * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED | |
48 * OF THE POSSIBILITY OF SUCH DAMAGE. | |
49 * | |
50 */ | |
51 | |
52 #ifndef _cggl_h | |
53 #define _cggl_h | |
54 | |
55 #include <Cg/cg.h> | |
56 | |
57 #ifdef _WIN32 | |
58 # ifndef APIENTRY /* From Win32's <windef.h> */ | |
59 # define CGGL_APIENTRY_DEFINED | |
60 # if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__) | |
61 # define APIENTRY __stdcall | |
62 # else | |
63 # define APIENTRY | |
64 # endif | |
65 # endif | |
66 # ifndef WINGDIAPI /* From Win32's <wingdi.h> and <winnt.h> */ | |
67 # define CGGL_WINGDIAPI_DEFINED | |
68 # define WINGDIAPI __declspec(dllimport) | |
69 # endif | |
70 #endif /* _WIN32 */ | |
71 | |
72 /* Set up for either Win32 import/export/lib. */ | |
73 #ifndef CGGL_API | |
74 # ifdef CGGL_EXPORTS | |
75 # ifdef _WIN32 | |
76 # define CGGL_API __declspec(dllexport) | |
77 # elif defined(__GNUC__) && __GNUC__>=4 | |
78 # define CGGL_API __attribute__ ((visibility("default"))) | |
79 # elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) | |
80 # define CGGL_API __global | |
81 # else | |
82 # define CGGL_API | |
83 # endif | |
84 # else | |
85 # define CGGL_API | |
86 # endif | |
87 #endif | |
88 | |
89 #ifndef CGGLENTRY | |
90 # ifdef _WIN32 | |
91 # define CGGLENTRY __cdecl | |
92 # else | |
93 # define CGGLENTRY | |
94 # endif | |
95 #endif | |
96 | |
97 #ifdef __APPLE__ | |
98 #include <OpenGL/gl.h> | |
99 #else | |
100 #include <GL/gl.h> | |
101 #endif | |
102 | |
103 #ifdef __cplusplus | |
104 extern "C" { | |
105 #endif | |
106 | |
107 /*****************************************************************************/ | |
108 /*** cgGL Type Definitions ***/ | |
109 /*****************************************************************************/ | |
110 | |
111 typedef enum | |
112 { | |
113 CG_GL_MATRIX_IDENTITY = 0, | |
114 CG_GL_MATRIX_TRANSPOSE = 1, | |
115 CG_GL_MATRIX_INVERSE = 2, | |
116 CG_GL_MATRIX_INVERSE_TRANSPOSE = 3, | |
117 | |
118 CG_GL_MODELVIEW_MATRIX, | |
119 CG_GL_PROJECTION_MATRIX, | |
120 CG_GL_TEXTURE_MATRIX, | |
121 CG_GL_MODELVIEW_PROJECTION_MATRIX, | |
122 | |
123 CG_GL_VERTEX, | |
124 CG_GL_FRAGMENT, | |
125 CG_GL_GEOMETRY | |
126 | |
127 } CGGLenum; | |
128 | |
129 | |
130 #ifndef CGGL_EXPLICIT | |
131 | |
132 /****************************************************************************** | |
133 *** Profile Functions | |
134 *****************************************************************************/ | |
135 | |
136 CGGL_API CGbool CGGLENTRY cgGLIsProfileSupported(CGprofile profile); | |
137 | |
138 CGGL_API void CGGLENTRY cgGLEnableProfile(CGprofile profile); | |
139 CGGL_API void CGGLENTRY cgGLDisableProfile(CGprofile profile); | |
140 | |
141 CGGL_API CGprofile CGGLENTRY cgGLGetLatestProfile(CGGLenum profile_type); | |
142 CGGL_API void CGGLENTRY cgGLSetOptimalOptions(CGprofile profile); | |
143 CGGL_API char const ** CGGLENTRY cgGLGetOptimalOptions(CGprofile profile); | |
144 | |
145 /****************************************************************************** | |
146 *** Program Managment Functions | |
147 *****************************************************************************/ | |
148 | |
149 CGGL_API void CGGLENTRY cgGLLoadProgram(CGprogram program); | |
150 CGGL_API void CGGLENTRY cgGLUnloadProgram(CGprogram program); | |
151 CGGL_API CGbool CGGLENTRY cgGLIsProgramLoaded(CGprogram program); | |
152 CGGL_API void CGGLENTRY cgGLBindProgram(CGprogram program); | |
153 CGGL_API void CGGLENTRY cgGLUnbindProgram(CGprofile profile); | |
154 CGGL_API GLuint CGGLENTRY cgGLGetProgramID(CGprogram program); | |
155 | |
156 /****************************************************************************** | |
157 *** Parameter Managment Functions | |
158 *****************************************************************************/ | |
159 | |
160 CGGL_API void CGGLENTRY cgGLSetParameter1f(CGparameter param, | |
161 float x); | |
162 | |
163 CGGL_API void CGGLENTRY cgGLSetParameter2f(CGparameter param, | |
164 float x, | |
165 float y); | |
166 | |
167 CGGL_API void CGGLENTRY cgGLSetParameter3f(CGparameter param, | |
168 float x, | |
169 float y, | |
170 float z); | |
171 | |
172 CGGL_API void CGGLENTRY cgGLSetParameter4f(CGparameter param, | |
173 float x, | |
174 float y, | |
175 float z, | |
176 float w); | |
177 | |
178 CGGL_API void CGGLENTRY cgGLSetParameter1fv(CGparameter param, const float *v); | |
179 | |
180 CGGL_API void CGGLENTRY cgGLSetParameter2fv(CGparameter param, const float *v); | |
181 | |
182 CGGL_API void CGGLENTRY cgGLSetParameter3fv(CGparameter param, const float *v); | |
183 | |
184 CGGL_API void CGGLENTRY cgGLSetParameter4fv(CGparameter param, const float *v); | |
185 | |
186 CGGL_API void CGGLENTRY cgGLSetParameter1d(CGparameter param, | |
187 double x); | |
188 | |
189 CGGL_API void CGGLENTRY cgGLSetParameter2d(CGparameter param, | |
190 double x, | |
191 double y); | |
192 | |
193 CGGL_API void CGGLENTRY cgGLSetParameter3d(CGparameter param, | |
194 double x, | |
195 double y, | |
196 double z); | |
197 | |
198 CGGL_API void CGGLENTRY cgGLSetParameter4d(CGparameter param, | |
199 double x, | |
200 double y, | |
201 double z, | |
202 double w); | |
203 | |
204 CGGL_API void CGGLENTRY cgGLSetParameter1dv(CGparameter param, const double *v); | |
205 | |
206 CGGL_API void CGGLENTRY cgGLSetParameter2dv(CGparameter param, const double *v); | |
207 | |
208 CGGL_API void CGGLENTRY cgGLSetParameter3dv(CGparameter param, const double *v); | |
209 | |
210 CGGL_API void CGGLENTRY cgGLSetParameter4dv(CGparameter param, const double *v); | |
211 | |
212 CGGL_API void CGGLENTRY cgGLGetParameter1f(CGparameter param, float *v); | |
213 | |
214 CGGL_API void CGGLENTRY cgGLGetParameter2f(CGparameter param, float *v); | |
215 | |
216 CGGL_API void CGGLENTRY cgGLGetParameter3f(CGparameter param, float *v); | |
217 | |
218 CGGL_API void CGGLENTRY cgGLGetParameter4f(CGparameter param, float *v); | |
219 | |
220 CGGL_API void CGGLENTRY cgGLGetParameter1d(CGparameter param, double *v); | |
221 | |
222 CGGL_API void CGGLENTRY cgGLGetParameter2d(CGparameter param, double *v); | |
223 | |
224 CGGL_API void CGGLENTRY cgGLGetParameter3d(CGparameter param, double *v); | |
225 | |
226 CGGL_API void CGGLENTRY cgGLGetParameter4d(CGparameter param, double *v); | |
227 | |
228 CGGL_API void CGGLENTRY cgGLSetParameterArray1f(CGparameter param, | |
229 long offset, | |
230 long nelements, | |
231 const float *v); | |
232 | |
233 CGGL_API void CGGLENTRY cgGLSetParameterArray2f(CGparameter param, | |
234 long offset, | |
235 long nelements, | |
236 const float *v); | |
237 | |
238 CGGL_API void CGGLENTRY cgGLSetParameterArray3f(CGparameter param, | |
239 long offset, | |
240 long nelements, | |
241 const float *v); | |
242 | |
243 CGGL_API void CGGLENTRY cgGLSetParameterArray4f(CGparameter param, | |
244 long offset, | |
245 long nelements, | |
246 const float *v); | |
247 | |
248 CGGL_API void CGGLENTRY cgGLSetParameterArray1d(CGparameter param, | |
249 long offset, | |
250 long nelements, | |
251 const double *v); | |
252 | |
253 CGGL_API void CGGLENTRY cgGLSetParameterArray2d(CGparameter param, | |
254 long offset, | |
255 long nelements, | |
256 const double *v); | |
257 | |
258 CGGL_API void CGGLENTRY cgGLSetParameterArray3d(CGparameter param, | |
259 long offset, | |
260 long nelements, | |
261 const double *v); | |
262 | |
263 CGGL_API void CGGLENTRY cgGLSetParameterArray4d(CGparameter param, | |
264 long offset, | |
265 long nelements, | |
266 const double *v); | |
267 | |
268 CGGL_API void CGGLENTRY cgGLGetParameterArray1f(CGparameter param, | |
269 long offset, | |
270 long nelements, | |
271 float *v); | |
272 | |
273 CGGL_API void CGGLENTRY cgGLGetParameterArray2f(CGparameter param, | |
274 long offset, | |
275 long nelements, | |
276 float *v); | |
277 | |
278 CGGL_API void CGGLENTRY cgGLGetParameterArray3f(CGparameter param, | |
279 long offset, | |
280 long nelements, | |
281 float *v); | |
282 | |
283 CGGL_API void CGGLENTRY cgGLGetParameterArray4f(CGparameter param, | |
284 long offset, | |
285 long nelements, | |
286 float *v); | |
287 | |
288 CGGL_API void CGGLENTRY cgGLGetParameterArray1d(CGparameter param, | |
289 long offset, | |
290 long nelements, | |
291 double *v); | |
292 | |
293 CGGL_API void CGGLENTRY cgGLGetParameterArray2d(CGparameter param, | |
294 long offset, | |
295 long nelements, | |
296 double *v); | |
297 | |
298 CGGL_API void CGGLENTRY cgGLGetParameterArray3d(CGparameter param, | |
299 long offset, | |
300 long nelements, | |
301 double *v); | |
302 | |
303 CGGL_API void CGGLENTRY cgGLGetParameterArray4d(CGparameter param, | |
304 long offset, | |
305 long nelements, | |
306 double *v); | |
307 | |
308 CGGL_API void CGGLENTRY cgGLSetParameterPointer(CGparameter param, | |
309 GLint fsize, | |
310 GLenum type, | |
311 GLsizei stride, | |
312 const GLvoid *pointer); | |
313 | |
314 CGGL_API void CGGLENTRY cgGLEnableClientState(CGparameter param); | |
315 CGGL_API void CGGLENTRY cgGLDisableClientState(CGparameter param); | |
316 | |
317 /****************************************************************************** | |
318 *** Matrix Parameter Managment Functions | |
319 *****************************************************************************/ | |
320 | |
321 CGGL_API void CGGLENTRY cgGLSetMatrixParameterdr(CGparameter param, | |
322 const double *matrix); | |
323 CGGL_API void CGGLENTRY cgGLSetMatrixParameterfr(CGparameter param, | |
324 const float *matrix); | |
325 CGGL_API void CGGLENTRY cgGLSetMatrixParameterdc(CGparameter param, | |
326 const double *matrix); | |
327 CGGL_API void CGGLENTRY cgGLSetMatrixParameterfc(CGparameter param, | |
328 const float *matrix); | |
329 | |
330 CGGL_API void CGGLENTRY cgGLGetMatrixParameterdr(CGparameter param, double *matrix); | |
331 CGGL_API void CGGLENTRY cgGLGetMatrixParameterfr(CGparameter param, float *matrix); | |
332 CGGL_API void CGGLENTRY cgGLGetMatrixParameterdc(CGparameter param, double *matrix); | |
333 CGGL_API void CGGLENTRY cgGLGetMatrixParameterfc(CGparameter param, float *matrix); | |
334 | |
335 CGGL_API void CGGLENTRY cgGLSetStateMatrixParameter(CGparameter param, | |
336 CGGLenum matrix, | |
337 CGGLenum transform); | |
338 | |
339 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfc(CGparameter param, | |
340 long offset, | |
341 long nelements, | |
342 const float *matrices); | |
343 | |
344 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfr(CGparameter param, | |
345 long offset, | |
346 long nelements, | |
347 const float *matrices); | |
348 | |
349 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydc(CGparameter param, | |
350 long offset, | |
351 long nelements, | |
352 const double *matrices); | |
353 | |
354 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydr(CGparameter param, | |
355 long offset, | |
356 long nelements, | |
357 const double *matrices); | |
358 | |
359 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfc(CGparameter param, | |
360 long offset, | |
361 long nelements, | |
362 float *matrices); | |
363 | |
364 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfr(CGparameter param, | |
365 long offset, | |
366 long nelements, | |
367 float *matrices); | |
368 | |
369 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydc(CGparameter param, | |
370 long offset, | |
371 long nelements, | |
372 double *matrices); | |
373 | |
374 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydr(CGparameter param, | |
375 long offset, | |
376 long nelements, | |
377 double *matrices); | |
378 | |
379 /****************************************************************************** | |
380 *** Texture Parameter Managment Functions | |
381 *****************************************************************************/ | |
382 | |
383 CGGL_API void CGGLENTRY cgGLSetTextureParameter(CGparameter param, GLuint texobj); | |
384 CGGL_API GLuint CGGLENTRY cgGLGetTextureParameter(CGparameter param); | |
385 CGGL_API void CGGLENTRY cgGLEnableTextureParameter(CGparameter param); | |
386 CGGL_API void CGGLENTRY cgGLDisableTextureParameter(CGparameter param); | |
387 CGGL_API GLenum CGGLENTRY cgGLGetTextureEnum(CGparameter param); | |
388 | |
389 CGGL_API void CGGLENTRY cgGLSetManageTextureParameters(CGcontext ctx, CGbool flag); | |
390 CGGL_API CGbool CGGLENTRY cgGLGetManageTextureParameters(CGcontext ctx); | |
391 | |
392 CGGL_API void CGGLENTRY cgGLSetupSampler(CGparameter param, GLuint texobj); | |
393 CGGL_API void CGGLENTRY cgGLRegisterStates(CGcontext); | |
394 | |
395 CGGL_API void CGGLENTRY cgGLEnableProgramProfiles( CGprogram program ); | |
396 CGGL_API void CGGLENTRY cgGLDisableProgramProfiles( CGprogram program ); | |
397 | |
398 /****************************************************************************** | |
399 *** Misc Functions | |
400 *****************************************************************************/ | |
401 | |
402 CGGL_API void CGGLENTRY cgGLSetDebugMode( CGbool debug ); | |
403 | |
404 /****************************************************************************** | |
405 *** Buffer Functions | |
406 *****************************************************************************/ | |
407 | |
408 CGGL_API CGbuffer CGGLENTRY cgGLCreateBuffer(CGcontext context, int size, const void *data, GLenum bufferUsage); | |
409 CGGL_API GLuint CGGLENTRY cgGLGetBufferObject(CGbuffer buffer); | |
410 | |
411 #endif | |
412 | |
413 #ifdef __cplusplus | |
414 } | |
415 #endif | |
416 | |
417 #ifdef CGGL_APIENTRY_DEFINED | |
418 # undef CGGL_APIENTRY_DEFINED | |
419 # undef APIENTRY | |
420 #endif | |
421 | |
422 #ifdef CGGL_WINGDIAPI_DEFINED | |
423 # undef CGGL_WINGDIAPI_DEFINED | |
424 # undef WINGDIAPI | |
425 #endif | |
426 | |
427 #endif |