Rice GLES2 (from mupen64plus-ae) plugin. Compile but doesn't works well on the OpenPa...
[mupen64plus-pandora.git] / source / gles2rice / src / OGLExtensions.h
1 /* OGLExtensions.h
2 Copyright (C) 2009 Richard Goedeken
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17 */
18
19 /* This header file contains function pointers to some OpenGL functions */
20 /* This is only necessary because Windows does not contain development support for OpenGL versions beyond 1.1 */
21
22 #if !defined(OGL_EXTENSIONS_H)
23 #define OGL_EXTENSIONS_H
24
25 #include <SDL_opengl.h>
26
27 /* Just call this one function to load up the function pointers. */
28 void OGLExtensions_Init(void);
29
30 /* The function pointer types are defined here because as of 2009 some OpenGL drivers under Linux do 'incorrect' things which
31    mess up the SDL_opengl.h header, resulting in no function pointer typedefs at all, and thus compilation errors.
32 */
33 typedef void (APIENTRYP PFUNCGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
34 typedef void (APIENTRYP PFUNCGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
35 typedef void (APIENTRYP PFUNCGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
36 typedef void (APIENTRYP PFUNCGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
37 typedef void (APIENTRYP PFUNCGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
38
39 typedef void (APIENTRYP PFUNCGLACTIVETEXTUREPROC) (GLenum texture);
40 typedef void (APIENTRYP PFUNCGLACTIVETEXTUREARBPROC) (GLenum texture);
41 typedef void (APIENTRYP PFUNCGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
42 typedef void (APIENTRYP PFUNCGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
43 typedef void (APIENTRYP PFUNCGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
44 typedef void (APIENTRYP PFUNCGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
45 typedef void (APIENTRYP PFUNCGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
46 typedef void (APIENTRYP PFUNCGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
47 typedef void (APIENTRYP PFUNCGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
48 typedef void (APIENTRYP PFUNCGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
49 typedef void (APIENTRYP PFUNCGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
50
51 extern bool                                 bNvidiaExtensionsSupported;
52 extern PFUNCGLCOMBINERPARAMETERFVNVPROC     pglCombinerParameterfvNV;
53 extern PFUNCGLFINALCOMBINERINPUTNVPROC      pglFinalCombinerInputNV;
54 extern PFUNCGLCOMBINEROUTPUTNVPROC          pglCombinerOutputNV;
55 extern PFUNCGLCOMBINERINPUTNVPROC           pglCombinerInputNV;
56 extern PFUNCGLCOMBINERPARAMETERINVPROC      pglCombinerParameteriNV;
57
58 extern PFUNCGLACTIVETEXTUREPROC             pglActiveTexture;
59 extern PFUNCGLACTIVETEXTUREARBPROC          pglActiveTextureARB;
60 extern PFUNCGLMULTITEXCOORD2FPROC           pglMultiTexCoord2f;
61 extern PFUNCGLMULTITEXCOORD2FVPROC          pglMultiTexCoord2fv;
62 extern PFUNCGLDELETEPROGRAMSARBPROC         pglDeleteProgramsARB;
63 extern PFUNCGLPROGRAMSTRINGARBPROC          pglProgramStringARB;
64 extern PFUNCGLBINDPROGRAMARBPROC            pglBindProgramARB;
65 extern PFUNCGLGENPROGRAMSARBPROC            pglGenProgramsARB;
66 extern PFUNCGLPROGRAMENVPARAMETER4FVARBPROC pglProgramEnvParameter4fvARB;
67 extern PFUNCGLFOGCOORDPOINTEREXTPROC        pglFogCoordPointerEXT;
68 extern PFUNCGLCLIENTACTIVETEXTUREARBPROC    pglClientActiveTextureARB;
69
70 #endif  // OGL_EXTENSIONS_H
71