Back to index

nux  3.0.0
OpenGLMapping.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2011 Inalogic® Inc.
00003  *
00004  * This program is free software: you can redistribute it and/or modify it
00005  * under the terms of the GNU Lesser General Public License, as
00006  * published by the  Free Software Foundation; either version 2.1 or 3.0
00007  * of the License.
00008  *
00009  * This program is distributed in the hope that it will be useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranties of
00011  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00012  * PURPOSE.  See the applicable version of the GNU Lesser General Public
00013  * License for more details.
00014  *
00015  * You should have received a copy of both the GNU Lesser General Public
00016  * License along with this program. If not, see <http://www.gnu.org/licenses/>
00017  *
00018  * Authored by: Travis Watkins <travis.watkins@linaro.org>
00019  *
00020  */
00021 
00022 // A series of defines to map GL functions to GLES functions
00023 
00024 #ifndef OPENGLMAPPING_H
00025 #define OPENGLMAPPING_H
00026 
00027 #define GL_GLEXT_PROTOTYPES
00028 
00029 #define GLcharARB GLchar
00030 
00031 #define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0
00032 #define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT
00033 #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER
00034 #define GL_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING
00035 #define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE
00036 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
00037 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
00038 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
00039 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
00040 #define GL_FRAMEBUFFER_UNSUPPORTED_EXT GL_FRAMEBUFFER_UNSUPPORTED
00041 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
00042 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
00043 
00044 #define GL_RENDERBUFFER_EXT GL_RENDERBUFFER
00045 #define GL_RENDERBUFFER_BINDING_EXT GL_RENDERBUFFER_BINDING
00046 #define GL_MAX_RENDERBUFFER_SIZE_EXT GL_MAX_RENDERBUFFER_SIZE
00047 
00048 #define GL_ARRAY_BUFFER_ARB GL_ARRAY_BUFFER
00049 #define GL_ELEMENT_ARRAY_BUFFER_ARB GL_ELEMENT_ARRAY_BUFFER
00050 
00051 // not sure if this will work in all cases
00052 #define GL_CLAMP GL_CLAMP_TO_EDGE
00053 // needs extra shader code but otherwise is equivalent
00054 #define GL_CLAMP_TO_BORDER GL_CLAMP_TO_EDGE
00055 
00056 #define GL_WRITE_ONLY_ARB GL_WRITE_ONLY_OES
00057 
00058 #define GL_VERTEX_SHADER_ARB GL_VERTEX_SHADER
00059 #define GL_FRAGMENT_SHADER_ARB GL_FRAGMENT_SHADER
00060 #define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB GL_ACTIVE_ATTRIBUTES
00061 
00062 #define glActiveTextureARB glActiveTexture
00063 
00064 #define glGenBuffersARB glGenBuffers
00065 #define glDeleteBuffersARB glDeleteBuffers
00066 #define glBindBufferARB glBindBuffer
00067 #define glBufferDataARB glBufferData
00068 #define glMapBufferARB glMapBufferOES
00069 #define glUnmapBufferARB glUnmapBufferOES
00070 
00071 #define glBindBufferARB glBindBuffer
00072 #define glEnableVertexAttribArrayARB glEnableVertexAttribArray
00073 #define glDisableVertexAttribArrayARB glDisableVertexAttribArray
00074 #define glVertexAttribPointerARB glVertexAttribPointer
00075 
00076 #define glDeleteFramebuffersEXT glDeleteFramebuffers
00077 #define glBindFramebufferEXT glBindFramebuffer
00078 #define glGenFramebuffersEXT glGenFramebuffers
00079 #define glFramebufferTexture2DEXT glFramebufferTexture2D
00080 #define glCheckFramebufferStatusEXT glCheckFramebufferStatus
00081 #define glGetFramebufferAttachmentParameterivEXT glGetFramebufferAttachmentParameteriv
00082 #define glFramebufferRenderbufferEXT glFramebufferRenderbuffer
00083 
00084 #define glBindRenderbufferEXT glBindRenderbuffer
00085 #define glRenderbufferStorageEXT glRenderbufferStorage
00086 #define glGenRenderbuffersEXT glGenRenderbuffers
00087 #define glDeleteRenderbuffersEXT glDeleteRenderbuffers
00088 
00089 #define glUseProgramObjectARB glUseProgram
00090 #define glGetObjectParameteriv glGetProgramiv
00091 
00092 #define glUniform1iARB glUniform1i
00093 #define glUniform2iARB glUniform2i
00094 #define glUniform3iARB glUniform3i
00095 #define glUniform4iARB glUniform4i
00096 
00097 #define glUniform1ivARB glUniform1iv
00098 #define glUniform2ivARB glUniform2iv
00099 #define glUniform3ivARB glUniform3iv
00100 #define glUniform4ivARB glUniform4iv
00101 
00102 #define glUniform1fARB glUniform1f
00103 #define glUniform2fARB glUniform2f
00104 #define glUniform3fARB glUniform3f
00105 #define glUniform4fARB glUniform4f
00106 
00107 #define glUniform1fvARB glUniform1fv
00108 #define glUniform2fvARB glUniform2fv
00109 #define glUniform3fvARB glUniform3fv
00110 #define glUniform4fvARB glUniform4fv
00111 
00112 #define glGetUniformfvARB glGetUniformfv
00113 #define glGetUniformivARB glGetUniformiv
00114 
00115 #define glUniformMatrix2fvARB glUniformMatrix2fv
00116 #define glUniformMatrix3fvARB glUniformMatrix3fv
00117 #define glUniformMatrix4fvARB glUniformMatrix4fv
00118 
00119 #define glGetActiveAttribARB glGetActiveAttrib
00120 #define glGetActiveUniformARB glGetActiveUniform
00121 #define glGetObjectParameterivARB glGetObjectParameteriv
00122 #define glGetUniformLocationARB glGetUniformLocation
00123 #define glGetAttribLocationARB glGetAttribLocation
00124 
00125 #define glDepthRange glDepthRangef
00126 #define glClearDepth glClearDepthf
00127 
00128 #endif // OPENGLMAPPING_H
00129