Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __SP_OPENGL_COREHEADER_H__
00009 #define __SP_OPENGL_COREHEADER_H__
00010
00011
00012 #include "Base/spStandard.hpp"
00013
00014 #ifdef SP_COMPILE_WITH_OPENGL
00015 # if defined(SP_PLATFORM_MACOSX)
00016 # include <OpenGL/gl.h>
00017 # include <OpenGL/glext.h>
00018 # else
00019 # include <GL/gl.h>
00020 # include <GL/glext.h>
00021 # endif
00022 #endif
00023
00024 #ifdef SP_COMPILE_WITH_OPENGLES1
00025 # ifdef SP_PLATFORM_IOS
00026 # include <OpenGLES/ES1/gl.h>
00027 # include <OpenGLES/ES1/glext.h>
00028 # else
00029 # include <EGL/egl.h>
00030 # include <GLES/gl.h>
00031 # include <GLES/glext.h>
00032 # endif
00033 #endif
00034
00035 #ifdef SP_COMPILE_WITH_OPENGLES2
00036 # ifdef SP_PLATFORM_IOS
00037 # include <OpenGLES/ES2/gl.h>
00038 # include <OpenGLES/ES2/glext.h>
00039 # else
00040 # include <EGL/egl.h>
00041 # include <GLES2/gl2.h>
00042 # include <GLES2/gl2ext.h>
00043 # endif
00044 #endif
00045
00046
00047
00048
00049 #define ChangeRenderStateForEachContext(c) \
00050 if (ContextList_.size() > 1 && UseAllRCs) \
00051 { \
00052 RenderContext* PrevContext = RenderContext::getActiveRenderContext(); \
00053 foreach (RenderContext* Context, ContextList_) \
00054 { \
00055 Context->activate(); \
00056 c \
00057 } \
00058 if (PrevContext) \
00059 PrevContext->activate(); \
00060 } \
00061 else \
00062 { \
00063 c \
00064 }
00065
00066
00067 #endif
00068
00069
00070
00071