Panda3D

glesgsg.h

00001 // Filename: glesgsg.h
00002 // Created by:  pro-rsoft (21May09)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef GLESGSG_H
00016 #define GLESGSG_H
00017 
00018 // This header file compiles a GSG for the limited subset of OpenGL
00019 // that is OpenGL ES.
00020 
00021 #include "pandabase.h"
00022 #include "config_glesgsg.h"
00023 
00024 #define GLP(name) gl##name
00025 
00026 #ifndef STDFLOAT_DOUBLE
00027 #define GLPf(name) gl ## name ## f
00028 #define GLPfv(name) gl ## name ## fv
00029 #else  // STDFLOAT_DOUBLE
00030 #define GLPf(name) gl ## name ## d
00031 #define GLPfv(name) gl ## name ## dv
00032 #endif  // STDFLOAT_DOUBLE
00033 
00034 #define CLP(name) GLES##name
00035 #define GLPREFIX_QUOTED "gl"
00036 #define CLASSPREFIX_QUOTED "GLES"
00037 #define GLSYSTEM_NAME "OpenGL ES"
00038 #define CONFIGOBJ config_glesgsg
00039 #define GLCAT glesgsg_cat
00040 #define EXPCL_GL EXPCL_PANDAGLES
00041 #define EXPTP_GL EXPTP_PANDAGLES
00042 #ifndef OPENGLES
00043   #define OPENGLES
00044 #endif
00045 #ifndef OPENGLES_1
00046   #define OPENGLES_1
00047 #endif
00048 #ifdef OPENGLES_2
00049   #error OPENGLES_2 should not be defined!
00050 #endif
00051 
00052 // This prevents glext.h from getting included by gl.h
00053 // That way, we can provide our own, better version.
00054 #define __glext_h_
00055 #define ES1_GLEXT_H_GUARD
00056 
00057 #ifdef IS_OSX
00058   #include <OpenGLES/ES1/gl.h>
00059   #include <OpenGLES/ES1/glext.h>
00060 #else
00061   #include <GLES/gl.h>
00062   #include <GLES/glext.h>
00063 #endif
00064 
00065 #include "panda_esglext.h"
00066 
00067 // This helps to keep the source clean of hundreds of #ifdefs.
00068 #define GL_NONE GL_NONE_OES
00069 #define GL_RENDERBUFFER_EXT GL_RENDERBUFFER_OES
00070 #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES
00071 #define GL_DRAW_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES
00072 #define GL_READ_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES
00073 #define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0_OES
00074 #define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT_OES
00075 #define GL_STENCIL_ATTACHMENT_EXT GL_STENCIL_ATTACHMENT_OES
00076 #define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE_OES
00077 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES
00078 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES
00079 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES
00080 #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES
00081 #define GL_FRAMEBUFFER_UNSUPPORTED_EXT GL_FRAMEBUFFER_UNSUPPORTED_OES
00082 #define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT24_OES
00083 #define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES
00084 #define GL_DEPTH_STENCIL_EXT GL_DEPTH_STENCIL_OES
00085 #define GL_UNSIGNED_INT_24_8_EXT GL_UNSIGNED_INT_24_8_OES
00086 #define GL_DEPTH24_STENCIL8_EXT GL_DEPTH24_STENCIL8_OES
00087 #define GL_DEPTH_COMPONENT16 GL_DEPTH_COMPONENT16_OES
00088 #define GL_DEPTH_COMPONENT24 GL_DEPTH_COMPONENT24_OES
00089 #define GL_DEPTH_COMPONENT32 GL_DEPTH_COMPONENT32_OES
00090 #define GL_TEXTURE_CUBE_MAP GL_TEXTURE_CUBE_MAP_OES
00091 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES
00092 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES
00093 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES
00094 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES
00095 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES
00096 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES
00097 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES
00098 #define GL_MIRRORED_REPEAT GL_MIRRORED_REPEAT_OES
00099 #define GL_RGB5_A1 GL_RGB5_A1_OES
00100 #define GL_RGBA4 GL_RGBA4_OES
00101 #define GL_RGB8 GL_RGB8_OES
00102 #define GL_RGBA8 GL_RGBA8_OES
00103 #define GL_FUNC_ADD GL_FUNC_ADD_OES
00104 #define GL_FUNC_SUBTRACT GL_FUNC_SUBTRACT_OES
00105 #define GL_FUNC_REVERSE_SUBTRACT GL_FUNC_REVERSE_SUBTRACT_OES
00106 
00107 #undef SUPPORT_IMMEDIATE_MODE
00108 #define APIENTRY
00109 #define APIENTRYP *
00110 
00111 #include "glstuff_src.h"
00112  
00113 #endif  // GLESGSG_H
 All Classes Functions Variables Enumerations