RetroArch
cgGL.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2002-2012, 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.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 /* Use CGGL_NO_OPENGL to avoid including OpenGL headers. */
103 
104 #ifndef CGGL_NO_OPENGL
105 # ifdef __APPLE__
106 # include <OpenGL/gl.h>
107 # else
108 # include <GL/gl.h>
109 # endif
110 #endif
111 
112 /*************************************************************************/
113 /*** Data types and enumerants ***/
114 /*************************************************************************/
115 
116 typedef enum
117 {
131 } CGGLenum;
132 
133 typedef enum
134 {
140 
141 #ifdef __cplusplus
142 extern "C"
143 {
144 #endif
145 
146 /*************************************************************************/
147 /*** Functions ***/
148 /*************************************************************************/
149 
150 #ifndef CGGL_EXPLICIT
151 
157 CGGL_API char const ** CGGLENTRY cgGLGetOptimalOptions(CGprofile profile);
166 CGGL_API void CGGLENTRY cgGLSetParameter3f(CGparameter param, float x, float y, float z);
167 CGGL_API void CGGLENTRY cgGLSetParameter4f(CGparameter param, float x, float y, float z, float w);
174 CGGL_API void CGGLENTRY cgGLSetParameter3d(CGparameter param, double x, double y, double z);
175 CGGL_API void CGGLENTRY cgGLSetParameter4d(CGparameter param, double x, double y, double z, double w);
188 CGGL_API void CGGLENTRY cgGLSetParameterArray1f(CGparameter param, long offset, long nelements, const float *v);
189 CGGL_API void CGGLENTRY cgGLSetParameterArray2f(CGparameter param, long offset, long nelements, const float *v);
190 CGGL_API void CGGLENTRY cgGLSetParameterArray3f(CGparameter param, long offset, long nelements, const float *v);
191 CGGL_API void CGGLENTRY cgGLSetParameterArray4f(CGparameter param, long offset, long nelements, const float *v);
192 CGGL_API void CGGLENTRY cgGLSetParameterArray1d(CGparameter param, long offset, long nelements, const double *v);
193 CGGL_API void CGGLENTRY cgGLSetParameterArray2d(CGparameter param, long offset, long nelements, const double *v);
194 CGGL_API void CGGLENTRY cgGLSetParameterArray3d(CGparameter param, long offset, long nelements, const double *v);
195 CGGL_API void CGGLENTRY cgGLSetParameterArray4d(CGparameter param, long offset, long nelements, const double *v);
196 CGGL_API void CGGLENTRY cgGLGetParameterArray1f(CGparameter param, long offset, long nelements, float *v);
197 CGGL_API void CGGLENTRY cgGLGetParameterArray2f(CGparameter param, long offset, long nelements, float *v);
198 CGGL_API void CGGLENTRY cgGLGetParameterArray3f(CGparameter param, long offset, long nelements, float *v);
199 CGGL_API void CGGLENTRY cgGLGetParameterArray4f(CGparameter param, long offset, long nelements, float *v);
200 CGGL_API void CGGLENTRY cgGLGetParameterArray1d(CGparameter param, long offset, long nelements, double *v);
201 CGGL_API void CGGLENTRY cgGLGetParameterArray2d(CGparameter param, long offset, long nelements, double *v);
202 CGGL_API void CGGLENTRY cgGLGetParameterArray3d(CGparameter param, long offset, long nelements, double *v);
203 CGGL_API void CGGLENTRY cgGLGetParameterArray4d(CGparameter param, long offset, long nelements, double *v);
216 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfc(CGparameter param, long offset, long nelements, const float *matrices);
217 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfr(CGparameter param, long offset, long nelements, const float *matrices);
218 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydc(CGparameter param, long offset, long nelements, const double *matrices);
219 CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydr(CGparameter param, long offset, long nelements, const double *matrices);
220 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfc(CGparameter param, long offset, long nelements, float *matrices);
221 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfr(CGparameter param, long offset, long nelements, float *matrices);
222 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydc(CGparameter param, long offset, long nelements, double *matrices);
223 CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydr(CGparameter param, long offset, long nelements, double *matrices);
236 CGGL_API CGbuffer CGGLENTRY cgGLCreateBuffer(CGcontext context, int size, const void *data, GLenum bufferUsage);
240 CGGL_API char const ** CGGLENTRY cgGLGetContextOptimalOptions(CGcontext context, CGprofile profile);
244 CGGL_API CGGLglslversion CGGLENTRY cgGLGetGLSLVersion(const char *version_string);
246 
247 #endif
248 
249 #ifdef __cplusplus
250 }
251 #endif
252 
253 #ifdef CGGL_APIENTRY_DEFINED
254 # undef CGGL_APIENTRY_DEFINED
255 # undef APIENTRY
256 #endif
257 
258 #ifdef CGGL_WINGDIAPI_DEFINED
259 # undef CGGL_WINGDIAPI_DEFINED
260 # undef WINGDIAPI
261 #endif
262 
263 #endif
CGGL_API void CGGLENTRY cgGLGetMatrixParameterfr(CGparameter param, float *matrix)
CGGL_API CGbool CGGLENTRY cgGLIsProfileSupported(CGprofile profile)
CGGLglslversion
Definition: cgGL.h:133
CGGL_API void CGGLENTRY cgGLSetContextGLSLVersion(CGcontext context, CGGLglslversion version)
Definition: cgGL.h:137
CGGL_API void CGGLENTRY cgGLSetStateMatrixParameter(CGparameter param, CGGLenum matrix, CGGLenum transform)
CGGL_API void CGGLENTRY cgGLSetParameter3d(CGparameter param, double x, double y, double z)
CGGL_API void CGGLENTRY cgGLDisableClientState(CGparameter param)
CGGL_API void CGGLENTRY cgGLSetParameter2fv(CGparameter param, const float *v)
CGGL_API void CGGLENTRY cgGLGetParameter3d(CGparameter param, double *v)
CGGL_API void CGGLENTRY cgGLSetParameter1dv(CGparameter param, const double *v)
CGGL_API GLuint CGGLENTRY cgGLGetTextureParameter(CGparameter param)
CGGL_API void CGGLENTRY cgGLDisableProfile(CGprofile profile)
Definition: cgGL.h:119
CGGL_API void CGGLENTRY cgGLRegisterStates(CGcontext ctx)
Definition: cgGL.h:136
Definition: cgGL.h:123
CGGL_API void CGGLENTRY cgGLGetParameterArray3d(CGparameter param, long offset, long nelements, double *v)
CGGL_API void CGGLENTRY cgGLSetParameter4fv(CGparameter param, const float *v)
CGGL_API void CGGLENTRY cgGLSetParameterArray3f(CGparameter param, long offset, long nelements, const float *v)
Definition: cgGL.h:138
CGGL_API void CGGLENTRY cgGLDisableTextureParameter(CGparameter param)
GLint fsize
Definition: glext.h:10315
unsigned int GLuint
Definition: nx_gl.h:48
GLsizeiptr size
Definition: glext.h:6559
Definition: cgGL.h:118
Definition: cgGL.h:125
CGGL_API void CGGLENTRY cgGLGetParameterArray1f(CGparameter param, long offset, long nelements, float *v)
GLuint GLenum matrix
Definition: glext.h:10314
CGGL_API void CGGLENTRY cgGLGetParameterArray3f(CGparameter param, long offset, long nelements, float *v)
GLsizei const GLvoid * pointer
Definition: glext.h:6488
GLdouble GLdouble z
Definition: glext.h:6514
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfr(CGparameter param, long offset, long nelements, const float *matrices)
int GLsizei
Definition: nx_gl.h:49
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydr(CGparameter param, long offset, long nelements, const double *matrices)
CGGL_API CGbuffer CGGLENTRY cgGLCreateBufferFromObject(CGcontext context, GLuint obj, CGbool manageObject)
Definition: ibxm.h:9
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfr(CGparameter param, long offset, long nelements, float *matrices)
CGGL_API void CGGLENTRY cgGLSetParameterPointer(CGparameter param, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer)
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfc(CGparameter param, long offset, long nelements, float *matrices)
CGGL_API void CGGLENTRY cgGLSetParameter2dv(CGparameter param, const double *v)
struct _CGprogram * CGprogram
Definition: cg.h:108
CGGL_API void CGGLENTRY cgGLSetParameter2d(CGparameter param, double x, double y)
CGGL_API void CGGLENTRY cgGLSetParameterArray3d(CGparameter param, long offset, long nelements, const double *v)
CGGL_API void CGGLENTRY cgGLGetParameter2d(CGparameter param, double *v)
CGGL_API void CGGLENTRY cgGLSetParameter4dv(CGparameter param, const double *v)
CGGL_API void CGGLENTRY cgGLSetParameter3dv(CGparameter param, const double *v)
CGGL_API void CGGLENTRY cgGLSetDebugMode(CGbool debug)
CGGL_API void CGGLENTRY cgGLGetParameterArray4f(CGparameter param, long offset, long nelements, float *v)
CGGL_API void CGGLENTRY cgGLSetParameter1d(CGparameter param, double x)
CGGL_API void CGGLENTRY cgGLSetParameter2f(CGparameter param, float x, float y)
CGGL_API void CGGLENTRY cgGLGetParameter4d(CGparameter param, double *v)
GLfloat param
Definition: glext.h:6480
GLenum type
Definition: glext.h:6233
GLuint program
Definition: glext.h:7390
CGGL_API void CGGLENTRY cgGLEnableProgramProfiles(CGprogram program)
CGGL_API CGGLglslversion CGGLENTRY cgGLGetContextGLSLVersion(CGcontext context)
CGGL_API void CGGLENTRY cgGLSetMatrixParameterfc(CGparameter param, const float *matrix)
CGGL_API CGprofile CGGLENTRY cgGLGetLatestProfile(CGGLenum profile_type)
CGGL_API void CGGLENTRY cgGLSetOptimalOptions(CGprofile profile)
Definition: cgGL.h:135
CGGL_API void CGGLENTRY cgGLBindProgram(CGprogram program)
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
version
Definition: setup.py:6
CGGL_API void CGGLENTRY cgGLEnableProfile(CGprofile profile)
CGGL_API void CGGLENTRY cgGLUnbindProgram(CGprofile profile)
CGGL_API void CGGLENTRY cgGLSetMatrixParameterdr(CGparameter param, const double *matrix)
CGprofile
Definition: cg.h:758
unsigned int GLenum
Definition: nx_gl.h:39
CGGL_API void CGGLENTRY cgGLLoadProgram(CGprogram program)
CGGL_API GLenum CGGLENTRY cgGLGetTextureEnum(CGparameter param)
CGGL_API void CGGLENTRY cgGLSetContextOptimalOptions(CGcontext context, CGprofile profile)
CGGL_API void CGGLENTRY cgGLGetParameterArray2d(CGparameter param, long offset, long nelements, double *v)
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
CGGL_API CGGLglslversion CGGLENTRY cgGLDetectGLSLVersion(void)
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydr(CGparameter param, long offset, long nelements, double *matrices)
Definition: cgGL.h:129
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
CGGL_API void CGGLENTRY cgGLSetParameter1f(CGparameter param, float x)
CGGL_API void CGGLENTRY cgGLEnableClientState(CGparameter param)
Definition: cgGL.h:121
CGGL_API void CGGLENTRY cgGLSetParameterArray4d(CGparameter param, long offset, long nelements, const double *v)
CGGL_API void CGGLENTRY cgGLGetMatrixParameterfc(CGparameter param, float *matrix)
CGGL_API void CGGLENTRY cgGLSetParameter4f(CGparameter param, float x, float y, float z, float w)
CGGL_API void CGGLENTRY cgGLSetParameterArray2d(CGparameter param, long offset, long nelements, const double *v)
CGGL_API GLuint CGGLENTRY cgGLGetProgramID(CGprogram program)
struct _CGbuffer * CGbuffer
Definition: cg.h:111
CGGL_API void CGGLENTRY cgGLSetTextureParameter(CGparameter param, GLuint texobj)
CGGL_API void CGGLENTRY cgGLGetParameter2f(CGparameter param, float *v)
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydc(CGparameter param, long offset, long nelements, double *matrices)
CGGL_API void CGGLENTRY cgGLGetMatrixParameterdr(CGparameter param, double *matrix)
Definition: cgGL.h:127
void GLvoid
Definition: nx_gl.h:42
CGGL_API void CGGLENTRY cgGLGetParameter1f(CGparameter param, float *v)
CGGL_API void CGGLENTRY cgGLSetManageTextureParameters(CGcontext ctx, CGbool flag)
Definition: cgGL.h:124
int CGbool
Definition: cg.h:106
CGGL_API void CGGLENTRY cgGLSetParameter3f(CGparameter param, float x, float y, float z)
struct _CGcontext * CGcontext
Definition: cg.h:107
Definition: cgGL.h:126
Definition: cgGL.h:130
const GLdouble * v
Definition: glext.h:6391
CGGL_API void CGGLENTRY cgGLSetMatrixParameterfr(CGparameter param, const float *matrix)
#define CGGL_API
Definition: cgGL.h:90
CGGL_API void CGGLENTRY cgGLSetParameterArray4f(CGparameter param, long offset, long nelements, const float *v)
CGGL_API GLuint CGGLENTRY cgGLGetBufferObject(CGbuffer buffer)
CGGL_API CGbool CGGLENTRY cgGLIsProgramLoaded(CGprogram program)
CGGL_API void CGGLENTRY cgGLSetParameterArray1d(CGparameter param, long offset, long nelements, const double *v)
CGGL_API void CGGLENTRY cgGLGetParameter1d(CGparameter param, double *v)
CGGL_API const char *CGGLENTRY cgGLGetGLSLVersionString(CGGLglslversion version)
CGGL_API CGbuffer CGGLENTRY cgGLCreateBuffer(CGcontext context, int size, const void *data, GLenum bufferUsage)
CGGL_API void CGGLENTRY cgGLGetParameter3f(CGparameter param, float *v)
CGGL_API void CGGLENTRY cgGLSetParameter3fv(CGparameter param, const float *v)
CGGL_API void CGGLENTRY cgGLGetParameterArray4d(CGparameter param, long offset, long nelements, double *v)
CGGL_API void CGGLENTRY cgGLGetParameter4f(CGparameter param, float *v)
#define CGGLENTRY
Definition: cgGL.h:98
CGGL_API void CGGLENTRY cgGLSetParameterArray1f(CGparameter param, long offset, long nelements, const float *v)
GLuint GLenum GLenum transform
Definition: glext.h:10314
CGGL_API CGbool CGGLENTRY cgGLGetManageTextureParameters(CGcontext ctx)
CGGL_API CGGLglslversion CGGLENTRY cgGLGetGLSLVersion(const char *version_string)
Definition: cgGL.h:128
CGGL_API void CGGLENTRY cgGLGetParameterArray1d(CGparameter param, long offset, long nelements, double *v)
CGGL_API char const **CGGLENTRY cgGLGetOptimalOptions(CGprofile profile)
GLsizei stride
Definition: glext.h:6488
Definition: cgGL.h:120
CGGL_API void CGGLENTRY cgGLUnloadProgram(CGprogram program)
CGGL_API void CGGLENTRY cgGLEnableTextureParameter(CGparameter param)
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydc(CGparameter param, long offset, long nelements, const double *matrices)
CGGL_API void CGGLENTRY cgGLSetParameterArray2f(CGparameter param, long offset, long nelements, const float *v)
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6742
CGGL_API void CGGLENTRY cgGLSetParameter1fv(CGparameter param, const float *v)
Definition: video4linux2.c:51
GLintptr offset
Definition: glext.h:6560
CGGL_API char const **CGGLENTRY cgGLGetContextOptimalOptions(CGcontext context, CGprofile profile)
CGGL_API void CGGLENTRY cgGLSetupSampler(CGparameter param, GLuint texobj)
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfc(CGparameter param, long offset, long nelements, const float *matrices)
CGGL_API void CGGLENTRY cgGLGetMatrixParameterdc(CGparameter param, double *matrix)
Definition: cgGL.h:122
CGGL_API void CGGLENTRY cgGLGetParameterArray2f(CGparameter param, long offset, long nelements, float *v)
struct _CGparameter * CGparameter
Definition: cg.h:109
int GLint
Definition: nx_gl.h:45
CGGL_API void CGGLENTRY cgGLSetParameter4d(CGparameter param, double x, double y, double z, double w)
CGGLenum
Definition: cgGL.h:116
CGGL_API void CGGLENTRY cgGLSetMatrixParameterdc(CGparameter param, const double *matrix)
GLsizei GLsizei GLuint * obj
Definition: glext.h:6682
CGGL_API void CGGLENTRY cgGLDisableProgramProfiles(CGprogram program)