istereo2

view src/sanegl.h @ 27:f0da8b2b61ec

removed iOS cpu restriction and bumped build number to 3 implemented android JNI calls to show/hide ads (untested)
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 05 Oct 2015 17:15:02 +0300
parents 81d35769f546
children
line source
1 /*
2 SaneGL - a small library to bring back sanity to OpenGL ES 2.x
3 Copyright (C) 2011 John Tsiombikas <nuclear@member.fsf.org>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 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, see <http://www.gnu.org/licenses/>.
17 */
19 #ifndef SANEGL_H_
20 #define SANEGL_H_
22 #include "opengl.h"
24 #ifndef GL_MODELVIEW
25 #define GL_MODELVIEW 0x1700
26 #endif
27 #ifndef GL_PROJECTION
28 #define GL_PROJECTION 0x1701
29 #endif
30 #ifndef GL_TEXTURE
31 #define GL_TEXTURE 0x1702
32 #endif
34 #ifndef GL_POINTS
35 #define GL_POINTS 0
36 #endif
37 #ifndef GL_LINES
38 #define GL_LINES 1
39 #endif
40 #ifndef GL_TRIANGLES
41 #define GL_TRIANGLES 4
42 #endif
43 #ifndef GL_QUADS
44 #define GL_QUADS 7
45 #endif
47 #ifdef GLDEF
49 #define glMatrixMode gl_matrix_mode
50 #define glPushMatrix gl_push_matrix
51 #define glPopMatrix gl_pop_matrix
52 #define glLoadIdentity gl_load_identity
53 #define glLoadMatrixf gl_load_matrixf
54 #define glMultMatrixf gl_mult_matrixf
55 #define glTranslatef gl_translatef
56 #define glRotatef gl_rotatef
57 #define glScalef gl_scalef
58 #define glOrtho gl_ortho
59 #define glFrustum gl_frustum
60 #define gluPerspective glu_perspective
62 #define glBegin gl_begin
63 #define glEnd gl_end
64 #define glVertex2f gl_vertex2f
65 #define glVertex3f gl_vertex3f
66 #define glVertex4f gl_vertex4f
67 #define glNormal3f gl_normal3f
68 #define glColor3f gl_color3f
69 #define glColor4f gl_color4f
70 #define glTexCoord1f gl_texcoord1f
71 #define glTexCoord2f gl_texcoord2f
72 #define glVertexAttrib2f gl_vertex_attrib2f
73 #define glVertexAttrib3f gl_vertex_attrib3f
74 #define glVertexAttrib4f gl_vertex_attrib4f
75 #endif
77 #ifdef __cplusplus
78 extern "C" {
79 #endif
81 /* matrix stuff */
82 void gl_matrix_mode(int mmode);
83 void gl_push_matrix(void);
84 void gl_pop_matrix(void);
85 void gl_load_identity(void);
86 void gl_load_matrixf(const float *mat);
87 void gl_mult_matrixf(const float *mat);
88 void gl_translatef(float x, float y, float z);
89 void gl_rotatef(float angle, float x, float y, float z);
90 void gl_scalef(float x, float y, float z);
91 void gl_ortho(float left, float right, float bottom, float top, float near, float far);
92 void gl_frustum(float left, float right, float bottom, float top, float near, float far);
93 void glu_perspective(float vfov, float aspect, float near, float far);
95 void gl_apply_xform(unsigned int prog);
98 /* immediate mode rendering */
99 void gl_begin(int prim);
100 void gl_end(void);
102 void gl_vertex2f(float x, float y);
103 void gl_vertex3f(float x, float y, float z);
104 void gl_vertex4f(float x, float y, float z, float w);
106 void gl_normal3f(float x, float y, float z);
108 void gl_color3f(float r, float g, float b);
109 void gl_color4f(float r, float g, float b, float a);
111 void gl_texcoord1f(float s);
112 void gl_texcoord2f(float s, float t);
114 void gl_vertex_attrib2f(int loc, float x, float y);
115 void gl_vertex_attrib3f(int loc, float x, float y, float z);
116 void gl_vertex_attrib4f(int loc, float x, float y, float z, float w);
118 #ifdef __cplusplus
119 }
120 #endif
122 #endif /* SANEGL_H_ */