rev |
line source |
nuclear@3
|
1 /*
|
nuclear@3
|
2 SaneGL - a small library to bring back sanity to OpenGL ES 2.x
|
nuclear@3
|
3 Copyright (C) 2011-2013 John Tsiombikas <nuclear@member.fsf.org>
|
nuclear@3
|
4
|
nuclear@3
|
5 This program is free software: you can redistribute it and/or modify
|
nuclear@3
|
6 it under the terms of the GNU General Public License as published by
|
nuclear@3
|
7 the Free Software Foundation, either version 3 of the License, or
|
nuclear@3
|
8 (at your option) any later version.
|
nuclear@3
|
9
|
nuclear@3
|
10 This program is distributed in the hope that it will be useful,
|
nuclear@3
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
nuclear@3
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
nuclear@3
|
13 GNU General Public License for more details.
|
nuclear@3
|
14
|
nuclear@3
|
15 You should have received a copy of the GNU General Public License
|
nuclear@3
|
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
|
nuclear@3
|
17 */
|
nuclear@3
|
18
|
nuclear@3
|
19 #ifndef SANEGL_H_
|
nuclear@3
|
20 #define SANEGL_H_
|
nuclear@3
|
21
|
nuclear@3
|
22 #include "opengl.h"
|
nuclear@3
|
23
|
nuclear@3
|
24 #ifndef GL_POINTS
|
nuclear@3
|
25 #define GL_POINTS 0
|
nuclear@3
|
26 #endif
|
nuclear@3
|
27 #ifndef GL_LINES
|
nuclear@3
|
28 #define GL_LINES 1
|
nuclear@3
|
29 #endif
|
nuclear@3
|
30 #ifndef GL_TRIANGLES
|
nuclear@3
|
31 #define GL_TRIANGLES 4
|
nuclear@3
|
32 #endif
|
nuclear@3
|
33 #ifndef GL_QUADS
|
nuclear@3
|
34 #define GL_QUADS 7
|
nuclear@3
|
35 #endif
|
nuclear@3
|
36
|
nuclear@3
|
37 /* glGet stuff */
|
nuclear@3
|
38 #ifndef GL_VIEWPORT
|
nuclear@3
|
39 #define GL_VIEWPORT 0x0BA2
|
nuclear@3
|
40 #endif
|
nuclear@3
|
41 #ifndef GL_MODELVIEW_MATRIX
|
nuclear@3
|
42 #define GL_MODELVIEW_MATRIX 0x0BA6
|
nuclear@3
|
43 #endif
|
nuclear@3
|
44 #ifndef GL_PROJECTION_MATRIX
|
nuclear@3
|
45 #define GL_PROJECTION_MATRIX 0x0BA7
|
nuclear@3
|
46 #endif
|
nuclear@3
|
47
|
nuclear@3
|
48 #ifdef GLDEF
|
nuclear@3
|
49
|
nuclear@3
|
50 #define glBegin gl_begin
|
nuclear@3
|
51 #define glEnd gl_end
|
nuclear@3
|
52 #define glVertex2f gl_vertex2f
|
nuclear@3
|
53 #define glVertex3f gl_vertex3f
|
nuclear@3
|
54 #define glVertex4f gl_vertex4f
|
nuclear@3
|
55 #define glNormal3f gl_normal3f
|
nuclear@3
|
56 #define glColor3f gl_color3f
|
nuclear@3
|
57 #define glColor4f gl_color4f
|
nuclear@3
|
58 #define glTexCoord1f gl_texcoord1f
|
nuclear@3
|
59 #define glTexCoord2f gl_texcoord2f
|
nuclear@3
|
60 #define glVertexAttrib2f gl_vertex_attrib2f
|
nuclear@3
|
61 #define glVertexAttrib3f gl_vertex_attrib3f
|
nuclear@3
|
62 #define glVertexAttrib4f gl_vertex_attrib4f
|
nuclear@3
|
63
|
nuclear@3
|
64 #define gluPerspective glu_perspective
|
nuclear@3
|
65
|
nuclear@3
|
66 #endif /* GLDEF */
|
nuclear@3
|
67
|
nuclear@3
|
68 #ifdef __cplusplus
|
nuclear@3
|
69 extern "C" {
|
nuclear@3
|
70 #endif
|
nuclear@3
|
71
|
nuclear@3
|
72 /* immediate mode rendering */
|
nuclear@3
|
73 void gl_begin(int prim);
|
nuclear@3
|
74 void gl_end(void);
|
nuclear@3
|
75
|
nuclear@3
|
76 void gl_vertex2f(float x, float y);
|
nuclear@3
|
77 void gl_vertex3f(float x, float y, float z);
|
nuclear@3
|
78 void gl_vertex4f(float x, float y, float z, float w);
|
nuclear@3
|
79
|
nuclear@3
|
80 void gl_normal3f(float x, float y, float z);
|
nuclear@3
|
81
|
nuclear@3
|
82 void gl_color3f(float r, float g, float b);
|
nuclear@3
|
83 void gl_color4f(float r, float g, float b, float a);
|
nuclear@3
|
84
|
nuclear@3
|
85 void gl_texcoord1f(float s);
|
nuclear@3
|
86 void gl_texcoord2f(float s, float t);
|
nuclear@3
|
87
|
nuclear@3
|
88 /* GLU */
|
nuclear@3
|
89
|
nuclear@3
|
90 void glu_perspective(float fov, float aspect, float nearz, float farz);
|
nuclear@3
|
91
|
nuclear@3
|
92 #ifdef __cplusplus
|
nuclear@3
|
93 }
|
nuclear@3
|
94 #endif
|
nuclear@3
|
95
|
nuclear@3
|
96 #endif /* SANEGL_H_ */
|