/[pcsx2_0.9.7]/trunk/3rdparty/Cg/cgGL.h
ViewVC logotype

Contents of /trunk/3rdparty/Cg/cgGL.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 290 - (show annotations) (download)
Sat Dec 25 02:51:30 2010 UTC (9 years ago) by william
File MIME type: text/plain
File size: 12953 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.4139 local: v0.9.7.283-latest) in ./trunk
1 /*
2 *
3 * Copyright (c) 2002-2010, 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 /*************************************************************************/
56 /*** CGGL Run-Time Library API ***/
57 /*************************************************************************/
58
59 #include <Cg/cg.h>
60
61 #ifdef _WIN32
62 # ifndef APIENTRY /* From Win32's <windef.h> */
63 # define CGGL_APIENTRY_DEFINED
64 # if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
65 # define APIENTRY __stdcall
66 # else
67 # define APIENTRY
68 # endif
69 # endif
70 # ifndef WINGDIAPI /* From Win32's <wingdi.h> and <winnt.h> */
71 # define CGGL_WINGDIAPI_DEFINED
72 # define WINGDIAPI __declspec(dllimport)
73 # endif
74 #endif /* _WIN32 */
75
76 /* Set up CGGL_API for Win32 dllexport or gcc visibility. */
77
78 #ifndef CGGL_API
79 # ifdef CGGL_EXPORTS
80 # ifdef _WIN32
81 # define CGGL_API __declspec(dllexport)
82 # elif defined(__GNUC__) && __GNUC__>=4
83 # define CGGL_API __attribute__ ((visibility("default")))
84 # elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
85 # define CGGL_API __global
86 # else
87 # define CGGL_API
88 # endif
89 # else
90 # define CGGL_API
91 # endif
92 #endif
93
94 #ifndef CGGLENTRY
95 # ifdef _WIN32
96 # define CGGLENTRY __cdecl
97 # else
98 # define CGGLENTRY
99 # endif
100 #endif
101
102 #ifdef __APPLE__
103 #include <OpenGL/gl.h>
104 #else
105 #include <GL/gl.h>
106 #endif
107
108 /*************************************************************************/
109 /*** Data types and enumerants ***/
110 /*************************************************************************/
111
112 typedef enum
113 {
114 CG_GL_MATRIX_IDENTITY = 0,
115 CG_GL_MATRIX_TRANSPOSE = 1,
116 CG_GL_MATRIX_INVERSE = 2,
117 CG_GL_MATRIX_INVERSE_TRANSPOSE = 3,
118 CG_GL_MODELVIEW_MATRIX = 4,
119 CG_GL_PROJECTION_MATRIX = 5,
120 CG_GL_TEXTURE_MATRIX = 6,
121 CG_GL_MODELVIEW_PROJECTION_MATRIX = 7,
122 CG_GL_VERTEX = 8,
123 CG_GL_FRAGMENT = 9,
124 CG_GL_GEOMETRY = 10,
125 CG_GL_TESSELLATION_CONTROL = 11,
126 CG_GL_TESSELLATION_EVALUATION = 12
127 } CGGLenum;
128
129 #ifdef __cplusplus
130 extern "C"
131 {
132 #endif
133
134 /*************************************************************************/
135 /*** Functions ***/
136 /*************************************************************************/
137
138 #ifndef CGGL_EXPLICIT
139
140 CGGL_API CGbool CGGLENTRY cgGLIsProfileSupported(CGprofile profile);
141 CGGL_API void CGGLENTRY cgGLEnableProfile(CGprofile profile);
142 CGGL_API void CGGLENTRY cgGLDisableProfile(CGprofile profile);
143 CGGL_API CGprofile CGGLENTRY cgGLGetLatestProfile(CGGLenum profile_type);
144 CGGL_API void CGGLENTRY cgGLSetOptimalOptions(CGprofile profile);
145 CGGL_API char const ** CGGLENTRY cgGLGetOptimalOptions(CGprofile profile);
146 CGGL_API void CGGLENTRY cgGLLoadProgram(CGprogram program);
147 CGGL_API void CGGLENTRY cgGLUnloadProgram(CGprogram program);
148 CGGL_API CGbool CGGLENTRY cgGLIsProgramLoaded(CGprogram program);
149 CGGL_API void CGGLENTRY cgGLBindProgram(CGprogram program);
150 CGGL_API void CGGLENTRY cgGLUnbindProgram(CGprofile profile);
151 CGGL_API GLuint CGGLENTRY cgGLGetProgramID(CGprogram program);
152 CGGL_API void CGGLENTRY cgGLSetParameter1f(CGparameter param, float x);
153 CGGL_API void CGGLENTRY cgGLSetParameter2f(CGparameter param, float x, float y);
154 CGGL_API void CGGLENTRY cgGLSetParameter3f(CGparameter param, float x, float y, float z);
155 CGGL_API void CGGLENTRY cgGLSetParameter4f(CGparameter param, float x, float y, float z, float w);
156 CGGL_API void CGGLENTRY cgGLSetParameter1fv(CGparameter param, const float *v);
157 CGGL_API void CGGLENTRY cgGLSetParameter2fv(CGparameter param, const float *v);
158 CGGL_API void CGGLENTRY cgGLSetParameter3fv(CGparameter param, const float *v);
159 CGGL_API void CGGLENTRY cgGLSetParameter4fv(CGparameter param, const float *v);
160 CGGL_API void CGGLENTRY cgGLSetParameter1d(CGparameter param, double x);
161 CGGL_API void CGGLENTRY cgGLSetParameter2d(CGparameter param, double x, double y);
162 CGGL_API void CGGLENTRY cgGLSetParameter3d(CGparameter param, double x, double y, double z);
163 CGGL_API void CGGLENTRY cgGLSetParameter4d(CGparameter param, double x, double y, double z, double w);
164 CGGL_API void CGGLENTRY cgGLSetParameter1dv(CGparameter param, const double *v);
165 CGGL_API void CGGLENTRY cgGLSetParameter2dv(CGparameter param, const double *v);
166 CGGL_API void CGGLENTRY cgGLSetParameter3dv(CGparameter param, const double *v);
167 CGGL_API void CGGLENTRY cgGLSetParameter4dv(CGparameter param, const double *v);
168 CGGL_API void CGGLENTRY cgGLGetParameter1f(CGparameter param, float *v);
169 CGGL_API void CGGLENTRY cgGLGetParameter2f(CGparameter param, float *v);
170 CGGL_API void CGGLENTRY cgGLGetParameter3f(CGparameter param, float *v);
171 CGGL_API void CGGLENTRY cgGLGetParameter4f(CGparameter param, float *v);
172 CGGL_API void CGGLENTRY cgGLGetParameter1d(CGparameter param, double *v);
173 CGGL_API void CGGLENTRY cgGLGetParameter2d(CGparameter param, double *v);
174 CGGL_API void CGGLENTRY cgGLGetParameter3d(CGparameter param, double *v);
175 CGGL_API void CGGLENTRY cgGLGetParameter4d(CGparameter param, double *v);
176 CGGL_API void CGGLENTRY cgGLSetParameterArray1f(CGparameter param, long offset, long nelements, const float *v);
177 CGGL_API void CGGLENTRY cgGLSetParameterArray2f(CGparameter param, long offset, long nelements, const float *v);
178 CGGL_API void CGGLENTRY cgGLSetParameterArray3f(CGparameter param, long offset, long nelements, const float *v);
179 CGGL_API void CGGLENTRY cgGLSetParameterArray4f(CGparameter param, long offset, long nelements, const float *v);
180 CGGL_API void CGGLENTRY cgGLSetParameterArray1d(CGparameter param, long offset, long nelements, const double *v);
181 CGGL_API void CGGLENTRY cgGLSetParameterArray2d(CGparameter param, long offset, long nelements, const double *v);
182 CGGL_API void CGGLENTRY cgGLSetParameterArray3d(CGparameter param, long offset, long nelements, const double *v);
183 CGGL_API void CGGLENTRY cgGLSetParameterArray4d(CGparameter param, long offset, long nelements, const double *v);
184 CGGL_API void CGGLENTRY cgGLGetParameterArray1f(CGparameter param, long offset, long nelements, float *v);
185 CGGL_API void CGGLENTRY cgGLGetParameterArray2f(CGparameter param, long offset, long nelements, float *v);
186 CGGL_API void CGGLENTRY cgGLGetParameterArray3f(CGparameter param, long offset, long nelements, float *v);
187 CGGL_API void CGGLENTRY cgGLGetParameterArray4f(CGparameter param, long offset, long nelements, float *v);
188 CGGL_API void CGGLENTRY cgGLGetParameterArray1d(CGparameter param, long offset, long nelements, double *v);
189 CGGL_API void CGGLENTRY cgGLGetParameterArray2d(CGparameter param, long offset, long nelements, double *v);
190 CGGL_API void CGGLENTRY cgGLGetParameterArray3d(CGparameter param, long offset, long nelements, double *v);
191 CGGL_API void CGGLENTRY cgGLGetParameterArray4d(CGparameter param, long offset, long nelements, double *v);
192 CGGL_API void CGGLENTRY cgGLSetParameterPointer(CGparameter param, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
193 CGGL_API void CGGLENTRY cgGLEnableClientState(CGparameter param);
194 CGGL_API void CGGLENTRY cgGLDisableClientState(CGparameter param);
195 CGGL_API void CGGLENTRY cgGLSetMatrixParameterdr(CGparameter param, const double *matrix);
196 CGGL_API void CGGLENTRY cgGLSetMatrixParameterfr(CGparameter param, const float *matrix);
197 CGGL_API void CGGLENTRY cgGLSetMatrixParameterdc(CGparameter param, const double *matrix);
198 CGGL_API void CGGLENTRY cgGLSetMatrixParameterfc(CGparameter param, const float *matrix);
199 CGGL_API void CGGLENTRY cgGLGetMatrixParameterdr(CGparameter param, double *matrix);
200 CGGL_API void CGGLENTRY cgGLGetMatrixParameterfr(CGparameter param, float *matrix);
201 CGGL_API void CGGLENTRY cgGLGetMatrixParameterdc(CGparameter param, double *matrix);
202 CGGL_API void CGGLENTRY cgGLGetMatrixParameterfc(CGparameter param, float *matrix);
203 CGGL_API void CGGLENTRY cgGLSetStateMatrixParameter(CGparameter param, CGGLenum matrix, CGGLenum transform);
204 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfc(CGparameter param, long offset, long nelements, const float *matrices);
205 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfr(CGparameter param, long offset, long nelements, const float *matrices);
206 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydc(CGparameter param, long offset, long nelements, const double *matrices);
207 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydr(CGparameter param, long offset, long nelements, const double *matrices);
208 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfc(CGparameter param, long offset, long nelements, float *matrices);
209 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfr(CGparameter param, long offset, long nelements, float *matrices);
210 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydc(CGparameter param, long offset, long nelements, double *matrices);
211 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydr(CGparameter param, long offset, long nelements, double *matrices);
212 CGGL_API void CGGLENTRY cgGLSetTextureParameter(CGparameter param, GLuint texobj);
213 CGGL_API GLuint CGGLENTRY cgGLGetTextureParameter(CGparameter param);
214 CGGL_API void CGGLENTRY cgGLEnableTextureParameter(CGparameter param);
215 CGGL_API void CGGLENTRY cgGLDisableTextureParameter(CGparameter param);
216 CGGL_API GLenum CGGLENTRY cgGLGetTextureEnum(CGparameter param);
217 CGGL_API void CGGLENTRY cgGLSetManageTextureParameters(CGcontext ctx, CGbool flag);
218 CGGL_API CGbool CGGLENTRY cgGLGetManageTextureParameters(CGcontext ctx);
219 CGGL_API void CGGLENTRY cgGLSetupSampler(CGparameter param, GLuint texobj);
220 CGGL_API void CGGLENTRY cgGLRegisterStates(CGcontext ctx);
221 CGGL_API void CGGLENTRY cgGLEnableProgramProfiles(CGprogram program);
222 CGGL_API void CGGLENTRY cgGLDisableProgramProfiles(CGprogram program);
223 CGGL_API void CGGLENTRY cgGLSetDebugMode(CGbool debug);
224 CGGL_API CGbuffer CGGLENTRY cgGLCreateBuffer(CGcontext context, int size, const void *data, GLenum bufferUsage);
225 CGGL_API GLuint CGGLENTRY cgGLGetBufferObject(CGbuffer buffer);
226
227 #endif
228
229 #ifdef __cplusplus
230 }
231 #endif
232
233 #ifdef CGGL_APIENTRY_DEFINED
234 # undef CGGL_APIENTRY_DEFINED
235 # undef APIENTRY
236 #endif
237
238 #ifdef CGGL_WINGDIAPI_DEFINED
239 # undef CGGL_WINGDIAPI_DEFINED
240 # undef WINGDIAPI
241 #endif
242
243 #endif

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.22