DEADSOFTWARE

Initial version
[nanogl.git] / GL / glesinterface.h
1 /*
2 Copyright (C) 2007-2009 Olli Hinkka
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.
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.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
21 #ifndef __GLESINTERFACE_H__
22 #define __GLESINTERFACE_H__
25 #if !defined (__WINS__)
26 #if defined(__TARGET_FPU_VFP)
27 #pragma softfp_linkage
28 #endif
29 #endif
30 struct GlESInterface
31 {
33 int (*eglChooseConfig) (int dpy, const int *attrib_list, int *configs, int config_size, int *num_config);
34 int (*eglCopyBuffers) (int dpy, int surface, void* target);
35 int (*eglCreateContext) (int dpy, int config, int share_list, const int *attrib_list);
36 int (*eglCreatePbufferSurface) (int dpy, int config, const int *attrib_list);
37 int (*eglCreatePixmapSurface) (int dpy, int config, void* pixmap, const int *attrib_list);
38 int (*eglCreateWindowSurface) (int dpy, int config, void* window, const int *attrib_list);
39 int (*eglDestroyContext) (int dpy, int ctx);
40 int (*eglDestroySurface) (int dpy, int surface);
41 int (*eglGetConfigAttrib) (int dpy, int config, int attribute, int *value);
42 int (*eglGetConfigs) (int dpy, int *configs, int config_size, int *num_config);
43 int (*eglGetCurrentContext) (void);
44 int (*eglGetCurrentDisplay) (void);
45 int (*eglGetCurrentSurface) (int readdraw);
46 int (*eglGetDisplay) (int display);
47 int (*eglGetError) (void);
49 void (*(*eglGetProcAddress) (const char *procname))(...);
51 int (*eglInitialize) (int dpy, int *major, int *minor);
52 int (*eglMakeCurrent) (int dpy, int draw, int read, int ctx);
53 int (*eglQueryContext) (int dpy, int ctx, int attribute, int *value);
54 const char * (*eglQueryString) (int dpy, int name);
55 int (*eglQuerySurface) (int dpy, int surface, int attribute, int *value);
56 int (*eglSwapBuffers) (int dpy, int draw);
57 int (*eglTerminate) (int dpy);
58 int (*eglWaitGL) (void);
59 int (*eglWaitNative) (int engine);
61 void (*glActiveTexture) (unsigned int texture);
62 void (*glAlphaFunc) (unsigned int func, float ref);
63 void (*glAlphaFuncx) (unsigned int func, int ref);
64 void (*glBindTexture) (unsigned int target, unsigned int texture);
65 void (*glBlendFunc) (unsigned int sfactor, unsigned int dfactor);
66 void (*glClear) (unsigned int mask);
67 void (*glClearColor) (float red, float green, float blue, float alpha);
68 void (*glClearColorx) (int red, int green, int blue, int alpha);
69 void (*glClearDepthf) (float depth);
70 void (*glClearDepthx) (int depth);
71 void (*glClearStencil) (int s);
72 void (*glClientActiveTexture) (unsigned int texture);
73 void (*glColor4f) (float red, float green, float blue, float alpha);
74 void (*glColor4x) (int red, int green, int blue, int alpha);
75 void (*glColorMask) (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha);
76 void (*glColorPointer) (int size, unsigned int type, int stride, const void *pointer);
77 void (*glCompressedTexImage2D) (unsigned int target, int level, unsigned int internalformat, int width, int height, int border, int imageSize, const void *data);
78 void (*glCompressedTexSubImage2D) (unsigned int target, int level, int xoffset, int yoffset, int width, int height, unsigned int format, int imageSize, const void *data);
79 void (*glCopyTexImage2D) (unsigned int target, int level, unsigned int internalformat, int x, int y, int width, int height, int border);
80 void (*glCopyTexSubImage2D) (unsigned int target, int level, int xoffset, int yoffset, int x, int y, int width, int height);
81 void (*glCullFace) (unsigned int mode);
82 void (*glDeleteTextures) (int n, const unsigned int *textures);
83 void (*glDepthFunc) (unsigned int func);
84 void (*glDepthMask) (unsigned char flag);
85 void (*glDepthRangef) (float zNear, float zFar);
86 void (*glDepthRangex) (int zNear, int zFar);
87 void (*glDisable) (unsigned int cap);
88 void (*glDisableClientState) (unsigned int array);
89 void (*glDrawArrays) (unsigned int mode, int first, int count);
90 void (*glDrawElements) (unsigned int mode, int count, unsigned int type, const void *indices);
91 void (*glEnable) (unsigned int cap);
92 void (*glEnableClientState) (unsigned int array);
93 void (*glFinish) (void);
94 void (*glFlush) (void);
95 void (*glFogf) (unsigned int pname, float param);
96 void (*glFogfv) (unsigned int pname, const float *params);
97 void (*glFogx) (unsigned int pname, int param);
98 void (*glFogxv) (unsigned int pname, const int *params);
99 void (*glFrontFace) (unsigned int mode);
100 void (*glFrustumf) (float left, float right, float bottom, float top, float zNear, float zFar);
101 void (*glFrustumx) (int left, int right, int bottom, int top, int zNear, int zFar);
102 void (*glGenTextures) (int n, unsigned int *textures);
103 unsigned int (*glGetError) (void);
104 void (*glGetIntegerv) (unsigned int pname, int *params);
105 const unsigned char * (*glGetString) (unsigned int name);
106 void (*glHint) (unsigned int target, unsigned int mode);
107 void (*glLightModelf) (unsigned int pname, float param);
108 void (*glLightModelfv) (unsigned int pname, const float *params);
109 void (*glLightModelx) (unsigned int pname, int param);
110 void (*glLightModelxv) (unsigned int pname, const int *params);
111 void (*glLightf) (unsigned int light, unsigned int pname, float param);
112 void (*glLightfv) (unsigned int light, unsigned int pname, const float *params);
113 void (*glLightx) (unsigned int light, unsigned int pname, int param);
114 void (*glLightxv) (unsigned int light, unsigned int pname, const int *params);
115 void (*glLineWidth) (float width);
116 void (*glLineWidthx) (int width);
117 void (*glLoadIdentity) (void);
118 void (*glLoadMatrixf) (const float *m);
119 void (*glLoadMatrixx) (const int *m);
120 void (*glLogicOp) (unsigned int opcode);
121 void (*glMaterialf) (unsigned int face, unsigned int pname, float param);
122 void (*glMaterialfv) (unsigned int face, unsigned int pname, const float *params);
123 void (*glMaterialx) (unsigned int face, unsigned int pname, int param);
124 void (*glMaterialxv) (unsigned int face, unsigned int pname, const int *params);
125 void (*glMatrixMode) (unsigned int mode);
126 void (*glMultMatrixf) (const float *m);
127 void (*glMultMatrixx) (const int *m);
128 void (*glMultiTexCoord4f) (unsigned int target, float s, float t, float r, float q);
129 void (*glMultiTexCoord4x) (unsigned int target, int s, int t, int r, int q);
130 void (*glNormal3f) (float nx, float ny, float nz);
131 void (*glNormal3x) (int nx, int ny, int nz);
132 void (*glNormalPointer) (unsigned int type, int stride, const void *pointer);
133 void (*glOrthof) (float left, float right, float bottom, float top, float zNear, float zFar);
134 void (*glOrthox) (int left, int right, int bottom, int top, int zNear, int zFar);
135 void (*glPixelStorei) (unsigned int pname, int param);
136 void (*glPointSize) (float size);
137 void (*glPointSizex) (int size);
138 void (*glPolygonOffset) (float factor, float units);
139 void (*glPolygonOffsetx) (int factor, int units);
140 void (*glPopMatrix) (void);
141 void (*glPushMatrix) (void);
142 unsigned int (*glQueryMatrixxOES) (int mantissa[16], int exponent[16]);
143 void (*glReadPixels) (int x, int y, int width, int height, unsigned int format, unsigned int type, void *pixels);
144 void (*glRotatef) (float angle, float x, float y, float z);
145 void (*glRotatex) (int angle, int x, int y, int z);
146 void (*glSampleCoverage) (float value, unsigned char invert);
147 void (*glSampleCoveragex) (int value, unsigned char invert);
148 void (*glScalef) (float x, float y, float z);
149 void (*glScalex) (int x, int y, int z);
150 void (*glScissor) (int x, int y, int width, int height);
151 void (*glShadeModel) (unsigned int mode);
152 void (*glStencilFunc) (unsigned int func, int ref, unsigned int mask);
153 void (*glStencilMask) (unsigned int mask);
154 void (*glStencilOp) (unsigned int fail, unsigned int zfail, unsigned int zpass);
155 void (*glTexCoordPointer) (int size, unsigned int type, int stride, const void *pointer);
156 void (*glTexEnvf) (unsigned int target, unsigned int pname, float param);
157 void (*glTexEnvfv) (unsigned int target, unsigned int pname, const float *params);
158 void (*glTexEnvx) (unsigned int target, unsigned int pname, int param);
159 void (*glTexEnvxv) (unsigned int target, unsigned int pname, const int *params);
160 void (*glTexImage2D) (unsigned int target, int level, int internalformat, int width, int height, int border, unsigned int format, unsigned int type, const void *pixels);
161 void (*glTexParameterf) (unsigned int target, unsigned int pname, float param);
162 void (*glTexParameterx) (unsigned int target, unsigned int pname, int param);
163 void (*glTexSubImage2D) (unsigned int target, int level, int xoffset, int yoffset, int width, int height, unsigned int format, unsigned int type, const void *pixels);
164 void (*glTranslatef) (float x, float y, float z);
165 void (*glTranslatex) (int x, int y, int z);
166 void (*glVertexPointer) (int size, unsigned int type, int stride, const void *pointer);
167 void (*glViewport) (int x, int y, int width, int height);
168 int (*eglSwapInterval) (int dpy, int interval);
169 void (*glBindBuffer) (unsigned int target, unsigned int buffer);
170 void (*glBufferData) (unsigned int target, int size, const void *data, unsigned int usage);
171 void (*glBufferSubData) (unsigned int target, int offset,int size, const void *data);
172 void (*glClipPlanef) (unsigned int plane, const float *equation);
173 void (*glClipPlanex) (unsigned int plane, const int *equation);
174 void (*glColor4ub) (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha);
175 void (*glDeleteBuffers) (int n, const unsigned int *buffers);
176 void (*glGenBuffers) (int n, unsigned int *buffers);
177 void (*glGetBooleanv) (unsigned int pname, unsigned char *params);
178 void (*glGetBufferParameteriv) (unsigned int target, unsigned int pname, int *params);
179 void (*glGetClipPlanef) (unsigned int pname, float eqn[4]);
180 void (*glGetClipPlanex) (unsigned int pname, int eqn[4]);
181 void (*glGetFixedv) (unsigned int pname, int *params);
182 void (*glGetFloatv) (unsigned int pname, float *params);
183 void (*glGetLightfv) (unsigned int light, unsigned int pname, float *params);
184 void (*glGetLightxv) (unsigned int light, unsigned int pname, int *params);
185 void (*glGetMaterialfv) (unsigned int face, unsigned int pname, float *params);
186 void (*glGetMaterialxv) (unsigned int face, unsigned int pname, int *params);
187 void (*glGetPointerv) (unsigned int pname, void **params);
188 void (*glGetTexEnvfv) (unsigned int env, unsigned int pname, float *params);
189 void (*glGetTexEnviv) (unsigned int env, unsigned int pname, int *params);
190 void (*glGetTexEnvxv) (unsigned int env, unsigned int pname, int *params);
191 void (*glGetTexParameterfv) (unsigned int target, unsigned int pname, float *params);
192 void (*glGetTexParameteriv) (unsigned int target, unsigned int pname, int *params);
193 void (*glGetTexParameterxv) (unsigned int target, unsigned int pname, int *params);
194 unsigned char (*glIsBuffer) (unsigned int buffer);
195 unsigned char (*glIsEnabled) (unsigned int cap);
196 unsigned char (*glIsTexture) (unsigned int texture);
197 void (*glPointParameterf) (unsigned int pname, float param);
198 void (*glPointParameterfv) (unsigned int pname, const float *params);
199 void (*glPointParameterx) (unsigned int pname, int param);
200 void (*glPointParameterxv) (unsigned int pname, const int *params);
201 void (*glPointSizePointerOES) (unsigned int type, int stride, const void *pointer);
202 void (*glTexEnvi) (unsigned int target, unsigned int pname, int param);
203 void (*glTexEnviv) (unsigned int target, unsigned int pname, const int *params);
204 void (*glTexParameterfv) (unsigned int target, unsigned int pname, const float *params);
205 void (*glTexParameteri) (unsigned int target, unsigned int pname, int param);
206 void (*glTexParameteriv) (unsigned int target, unsigned int pname, const int *params);
207 void (*glTexParameterxv) (unsigned int target, unsigned int pname, const int *params);
209 int (*eglBindTexImage) (int dpy, int surface, int buffer);
210 int (*eglReleaseTexImage) (int dpy, int surface, int buffer);
211 int (*eglSurfaceAttrib) (int dpy, int surface, int attribute, int value);
213 };
214 #if !defined (__WINS__)
215 #if defined(__TARGET_FPU_VFP)
216 #pragma no_softfp_linkage
217 #endif
218 #endif
221 #endif