istereo2

annotate src/sanegl.h @ 21:8f41da60b9f5

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