labyrinth
view src/gles/sanegl.h @ 7:b557812c45db
generating the android (ant) project stuff from the makefile
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 04 May 2015 02:46:35 +0300 |
parents | |
children |
line source
1 /*
2 SaneGL - a small library to bring back sanity to OpenGL ES 2.x
3 Copyright (C) 2011-2013 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_POINTS
25 #define GL_POINTS 0
26 #endif
27 #ifndef GL_LINES
28 #define GL_LINES 1
29 #endif
30 #ifndef GL_TRIANGLES
31 #define GL_TRIANGLES 4
32 #endif
33 #ifndef GL_QUADS
34 #define GL_QUADS 7
35 #endif
37 /* glGet stuff */
38 #ifndef GL_VIEWPORT
39 #define GL_VIEWPORT 0x0BA2
40 #endif
41 #ifndef GL_MODELVIEW_MATRIX
42 #define GL_MODELVIEW_MATRIX 0x0BA6
43 #endif
44 #ifndef GL_PROJECTION_MATRIX
45 #define GL_PROJECTION_MATRIX 0x0BA7
46 #endif
48 #ifdef GLDEF
50 #define glBegin gl_begin
51 #define glEnd gl_end
52 #define glVertex2f gl_vertex2f
53 #define glVertex3f gl_vertex3f
54 #define glVertex4f gl_vertex4f
55 #define glNormal3f gl_normal3f
56 #define glColor3f gl_color3f
57 #define glColor4f gl_color4f
58 #define glTexCoord1f gl_texcoord1f
59 #define glTexCoord2f gl_texcoord2f
60 #define glVertexAttrib2f gl_vertex_attrib2f
61 #define glVertexAttrib3f gl_vertex_attrib3f
62 #define glVertexAttrib4f gl_vertex_attrib4f
64 #define gluPerspective glu_perspective
66 #endif /* GLDEF */
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
72 /* immediate mode rendering */
73 void gl_begin(int prim);
74 void gl_end(void);
76 void gl_vertex2f(float x, float y);
77 void gl_vertex3f(float x, float y, float z);
78 void gl_vertex4f(float x, float y, float z, float w);
80 void gl_normal3f(float x, float y, float z);
82 void gl_color3f(float r, float g, float b);
83 void gl_color4f(float r, float g, float b, float a);
85 void gl_texcoord1f(float s);
86 void gl_texcoord2f(float s, float t);
88 /* GLU */
90 void glu_perspective(float fov, float aspect, float nearz, float farz);
92 #ifdef __cplusplus
93 }
94 #endif
96 #endif /* SANEGL_H_ */