27 #ifndef _CEGUIOpenGL_h_ 28 #define _CEGUIOpenGL_h_ 30 #include "CEGUI/Config.h" 32 #if defined CEGUI_USE_EPOXY 36 #elif defined CEGUI_USE_GLEW 42 # if (defined( __WIN32__ ) || defined( _WIN32 )) 47 # include <OpenGL/glu.h> 51 #error Either "CEGUI_USE_EPOXY" or "CEGUI_USE_GLEW" must be defined. Defining both or none is invalid. 55 #define GL_RGB565 0x8D62 58 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC) 59 # if defined(CEGUIOPENGLRENDERER_EXPORTS) || defined(CEGUIOPENGLES2RENDERER_EXPORTS) 60 # define OPENGL_GUIRENDERER_API __declspec(dllexport) 62 # define OPENGL_GUIRENDERER_API __declspec(dllimport) 65 # define OPENGL_GUIRENDERER_API 91 static OpenGLInfo& getSingleton() {
return s_instance; }
140 return verMajor() > major || (verMajor() == major && verMinor() >= minor); }
162 {
return d_isReadBufferSupported; }
169 {
return d_isPolygonModeSupported; }
183 {
return d_isSeperateReadAndDrawFramebufferSupported; }
185 bool isSizedInternalFormatSupported()
const 186 {
return d_isSizedInternalFormatSupported; }
195 void verForce(GLint verMajor_, GLint verMinor_);
201 void initTypeAndVer();
202 void initSupportedFeatures();
207 GLint d_verMajorForce;
208 GLint d_verMinorForce;
209 bool d_isS3tcSupported;
210 bool d_isNpotTextureSupported;
211 bool d_isReadBufferSupported;
212 bool d_isPolygonModeSupported;
213 bool d_isSeperateReadAndDrawFramebufferSupported;
214 bool d_isVaoSupported;
215 bool d_isSizedInternalFormatSupported;
220 #endif // end of guard _CEGUIOpenGL_h_ bool isUsingDesktopOpengl() const
Returns true if using Desktop OpenGL.
Definition: GL.h:112
bool isNpotTextureSupported() const
Returns true if NPOT (non-power-of-two) textures are supported.
Definition: GL.h:155
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
bool isSeperateReadAndDrawFramebufferSupported() const
Returns true if working with the read/draw framebuffers seperately is supported.
Definition: GL.h:182
Type
Type of the OpenGL (desktop or ES) context.
Definition: GL.h:84
GLint verMinor() const
Returns OpenGL (desktop or ES) minor version. Only supports Epoxy! Otherwise returns -1;...
Definition: GL.h:132
bool isPolygonModeSupported() const
Returns true if "glPolygonMode" is supported.
Definition: GL.h:168
Type type() const
Type of the OpenGL (desktop or ES) context.
Definition: GL.h:106
bool isUsingOpenglEs() const
Returns true if using OpenGL ES.
Definition: GL.h:118
bool isVaoSupported() const
Returns true if VAO-s (Vertex Array Objects) are supported.
Definition: GL.h:175
GLint verMajor() const
Returns OpenGL (desktop or ES) major version. Only supports Epoxy! Otherwise returns -1;...
Definition: GL.h:125
bool verAtLeast(GLint major, GLint minor)
Returns true if the OpenGL (desktop or ES) version is at least "major.minor". Only supports Epoxy! Ot...
Definition: GL.h:139
bool isReadBufferSupported() const
Returns true if "glReadBuffer" is supported.
Definition: GL.h:161
bool isS3tcSupported() const
Returns true if "S3TC" texture compression is supported.
Definition: GL.h:149
Provides information about the type of OpenGL used by an OpenGL context (desktop OpenGL or OpenGL ES)...
Definition: GL.h:76