nuclear@3: /* nuclear@3: SaneGL - a small library to bring back sanity to OpenGL ES 2.x nuclear@3: Copyright (C) 2011-2013 John Tsiombikas nuclear@3: nuclear@3: This program is free software: you can redistribute it and/or modify nuclear@3: it under the terms of the GNU General Public License as published by nuclear@3: the Free Software Foundation, either version 3 of the License, or nuclear@3: (at your option) any later version. nuclear@3: nuclear@3: This program is distributed in the hope that it will be useful, nuclear@3: but WITHOUT ANY WARRANTY; without even the implied warranty of nuclear@3: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nuclear@3: GNU General Public License for more details. nuclear@3: nuclear@3: You should have received a copy of the GNU General Public License nuclear@3: along with this program. If not, see . nuclear@3: */ nuclear@3: nuclear@3: #ifndef SANEGL_H_ nuclear@3: #define SANEGL_H_ nuclear@3: nuclear@3: #include "opengl.h" nuclear@3: nuclear@3: #ifndef GL_POINTS nuclear@3: #define GL_POINTS 0 nuclear@3: #endif nuclear@3: #ifndef GL_LINES nuclear@3: #define GL_LINES 1 nuclear@3: #endif nuclear@3: #ifndef GL_TRIANGLES nuclear@3: #define GL_TRIANGLES 4 nuclear@3: #endif nuclear@3: #ifndef GL_QUADS nuclear@3: #define GL_QUADS 7 nuclear@3: #endif nuclear@3: nuclear@3: /* glGet stuff */ nuclear@3: #ifndef GL_VIEWPORT nuclear@3: #define GL_VIEWPORT 0x0BA2 nuclear@3: #endif nuclear@3: #ifndef GL_MODELVIEW_MATRIX nuclear@3: #define GL_MODELVIEW_MATRIX 0x0BA6 nuclear@3: #endif nuclear@3: #ifndef GL_PROJECTION_MATRIX nuclear@3: #define GL_PROJECTION_MATRIX 0x0BA7 nuclear@3: #endif nuclear@3: nuclear@3: #ifdef GLDEF nuclear@3: nuclear@3: #define glBegin gl_begin nuclear@3: #define glEnd gl_end nuclear@3: #define glVertex2f gl_vertex2f nuclear@3: #define glVertex3f gl_vertex3f nuclear@3: #define glVertex4f gl_vertex4f nuclear@3: #define glNormal3f gl_normal3f nuclear@3: #define glColor3f gl_color3f nuclear@3: #define glColor4f gl_color4f nuclear@3: #define glTexCoord1f gl_texcoord1f nuclear@3: #define glTexCoord2f gl_texcoord2f nuclear@3: #define glVertexAttrib2f gl_vertex_attrib2f nuclear@3: #define glVertexAttrib3f gl_vertex_attrib3f nuclear@3: #define glVertexAttrib4f gl_vertex_attrib4f nuclear@3: nuclear@3: #define gluPerspective glu_perspective nuclear@3: nuclear@3: #endif /* GLDEF */ nuclear@3: nuclear@3: #ifdef __cplusplus nuclear@3: extern "C" { nuclear@3: #endif nuclear@3: nuclear@3: /* immediate mode rendering */ nuclear@3: void gl_begin(int prim); nuclear@3: void gl_end(void); nuclear@3: nuclear@3: void gl_vertex2f(float x, float y); nuclear@3: void gl_vertex3f(float x, float y, float z); nuclear@3: void gl_vertex4f(float x, float y, float z, float w); nuclear@3: nuclear@3: void gl_normal3f(float x, float y, float z); nuclear@3: nuclear@3: void gl_color3f(float r, float g, float b); nuclear@3: void gl_color4f(float r, float g, float b, float a); nuclear@3: nuclear@3: void gl_texcoord1f(float s); nuclear@3: void gl_texcoord2f(float s, float t); nuclear@3: nuclear@3: /* GLU */ nuclear@3: nuclear@3: void glu_perspective(float fov, float aspect, float nearz, float farz); nuclear@3: nuclear@3: #ifdef __cplusplus nuclear@3: } nuclear@3: #endif nuclear@3: nuclear@3: #endif /* SANEGL_H_ */