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)
38# if !defined(CEGUI_DONT_USE_GLEW_LOCALLY)
44# if (defined( __WIN32__ ) || defined( _WIN32 ))
49# include <OpenGL/glu.h>
53#error Either "CEGUI_USE_EPOXY" or "CEGUI_USE_GLEW" must be defined. Defining both or none is invalid.
57#define GL_RGB565 0x8D62
60#if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
61# if defined(CEGUIOPENGLRENDERER_EXPORTS) || defined(CEGUIOPENGLES2RENDERER_EXPORTS)
62# define OPENGL_GUIRENDERER_API __declspec(dllexport)
64# define OPENGL_GUIRENDERER_API __declspec(dllimport)
67# define OPENGL_GUIRENDERER_API
93 static OpenGLInfo& getSingleton() {
return s_instance; }
142 return verMajor() > major || (verMajor() == major && verMinor() >= minor); }
164 {
return d_isReadBufferSupported; }
171 {
return d_isPolygonModeSupported; }
185 {
return d_isSeperateReadAndDrawFramebufferSupported; }
187 bool isSizedInternalFormatSupported()
const
188 {
return d_isSizedInternalFormatSupported; }
197 void verForce(GLint verMajor_, GLint verMinor_);
201 static OpenGLInfo s_instance;
203 void initTypeAndVer();
204 void initSupportedFeatures();
209 GLint d_verMajorForce;
210 GLint d_verMinorForce;
211 bool d_isS3tcSupported;
212 bool d_isNpotTextureSupported;
213 bool d_isReadBufferSupported;
214 bool d_isPolygonModeSupported;
215 bool d_isSeperateReadAndDrawFramebufferSupported;
216 bool d_isVaoSupported;
217 bool d_isSizedInternalFormatSupported;
Provides information about the type of OpenGL used by an OpenGL context (desktop OpenGL or OpenGL ES)...
Definition GL.h:79
bool isNpotTextureSupported() const
Returns true if NPOT (non-power-of-two) textures are supported.
Definition GL.h:157
Type type() const
Type of the OpenGL (desktop or ES) context.
Definition GL.h:108
bool isUsingDesktopOpengl() const
Returns true if using Desktop OpenGL.
Definition GL.h:114
bool verAtLeast(GLint major, GLint minor)
Returns true if the OpenGL (desktop or ES) version is at least "major.minor". Only supports Epoxy!...
Definition GL.h:141
GLint verMajor() const
Returns OpenGL (desktop or ES) major version. Only supports Epoxy! Otherwise returns -1;.
Definition GL.h:127
Type
Type of the OpenGL (desktop or ES) context.
Definition GL.h:87
@ TYPE_DESKTOP
Definition GL.h:89
@ TYPE_NONE
Definition GL.h:88
bool isSeperateReadAndDrawFramebufferSupported() const
Returns true if working with the read/draw framebuffers seperately is supported.
Definition GL.h:184
bool isS3tcSupported() const
Returns true if "S3TC" texture compression is supported.
Definition GL.h:151
bool isVaoSupported() const
Returns true if VAO-s (Vertex Array Objects) are supported.
Definition GL.h:177
bool isUsingOpenglEs() const
Returns true if using OpenGL ES.
Definition GL.h:120
void init()
Must be called before any other method.
GLint verMinor() const
Returns OpenGL (desktop or ES) minor version. Only supports Epoxy! Otherwise returns -1;.
Definition GL.h:134
bool isReadBufferSupported() const
Returns true if "glReadBuffer" is supported.
Definition GL.h:163
bool isPolygonModeSupported() const
Returns true if "glPolygonMode" is supported.
Definition GL.h:170
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1