Panda3D
|
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 #define CLP(name) GLES##name 00026 #define GLPREFIX_QUOTED "gl" 00027 #define CLASSPREFIX_QUOTED "GLES" 00028 #define GLSYSTEM_NAME "OpenGL ES" 00029 #define CONFIGOBJ config_glesgsg 00030 #define GLCAT glesgsg_cat 00031 #define EXPCL_GL EXPCL_PANDAGLES 00032 #define EXPTP_GL EXPTP_PANDAGLES 00033 #ifndef OPENGLES 00034 #define OPENGLES 00035 #endif 00036 #ifndef OPENGLES_1 00037 #define OPENGLES_1 00038 #endif 00039 #ifdef OPENGLES_2 00040 #error OPENGLES_2 should not be defined! 00041 #endif 00042 00043 // This prevents glext.h from getting included by gl.h 00044 // That way, we can provide our own, better version. 00045 #define __glext_h_ 00046 #define ES1_GLEXT_H_GUARD 00047 00048 #ifdef IS_OSX 00049 #include <OpenGLES/ES1/gl.h> 00050 #include <OpenGLES/ES1/glext.h> 00051 #else 00052 #include <GLES/gl.h> 00053 #include <GLES/glext.h> 00054 #endif 00055 00056 #include "panda_esglext.h" 00057 00058 // This helps to keep the source clean of hundreds of #ifdefs. 00059 #define GL_NONE GL_NONE_OES 00060 #define GL_RENDERBUFFER_EXT GL_RENDERBUFFER_OES 00061 #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES 00062 #define GL_DRAW_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES 00063 #define GL_READ_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES 00064 #define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0_OES 00065 #define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT_OES 00066 #define GL_STENCIL_ATTACHMENT_EXT GL_STENCIL_ATTACHMENT_OES 00067 #define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE_OES 00068 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 00069 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 00070 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 00071 #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 00072 #define GL_FRAMEBUFFER_UNSUPPORTED_EXT GL_FRAMEBUFFER_UNSUPPORTED_OES 00073 #define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT24_OES 00074 #define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES 00075 #define GL_DEPTH_STENCIL_EXT GL_DEPTH_STENCIL_OES 00076 #define GL_UNSIGNED_INT_24_8_EXT GL_UNSIGNED_INT_24_8_OES 00077 #define GL_DEPTH24_STENCIL8_EXT GL_DEPTH24_STENCIL8_OES 00078 #define GL_DEPTH_COMPONENT16 GL_DEPTH_COMPONENT16_OES 00079 #define GL_DEPTH_COMPONENT24 GL_DEPTH_COMPONENT24_OES 00080 #define GL_DEPTH_COMPONENT32 GL_DEPTH_COMPONENT32_OES 00081 #define GL_TEXTURE_CUBE_MAP GL_TEXTURE_CUBE_MAP_OES 00082 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 00083 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 00084 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 00085 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 00086 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 00087 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 00088 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 00089 #define GL_MIRRORED_REPEAT GL_MIRRORED_REPEAT_OES 00090 #define GL_RGB5_A1 GL_RGB5_A1_OES 00091 #define GL_RGBA4 GL_RGBA4_OES 00092 #define GL_RGB8 GL_RGB8_OES 00093 #define GL_RGBA8 GL_RGBA8_OES 00094 #define GL_FUNC_ADD GL_FUNC_ADD_OES 00095 #define GL_FUNC_SUBTRACT GL_FUNC_SUBTRACT_OES 00096 #define GL_FUNC_REVERSE_SUBTRACT GL_FUNC_REVERSE_SUBTRACT_OES 00097 00098 #undef SUPPORT_IMMEDIATE_MODE 00099 #define APIENTRY 00100 #define APIENTRYP * 00101 00102 #include "glstuff_src.h" 00103 00104 #endif // GLESGSG_H