28 #ifndef _CEGUIOpenGLRenderer_h_
29 #define _CEGUIOpenGLRenderer_h_
31 #include "../../CEGUIBase.h"
32 #include "../../CEGUIRenderer.h"
33 #include "../../CEGUISize.h"
34 #include "../../CEGUIVector.h"
35 #include "CEGUIOpenGL.h"
38 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
39 # ifdef OPENGL_GUIRENDERER_EXPORTS
40 # define OPENGL_GUIRENDERER_API __declspec(dllexport)
42 # define OPENGL_GUIRENDERER_API __declspec(dllimport)
45 # define OPENGL_GUIRENDERER_API
49 # pragma warning(push)
50 # pragma warning(disable : 4251)
58 class OpenGLTextureTarget;
59 class OpenGLGeometryBuffer;
60 class OGLTextureTargetFactory;
90 static OpenGLRenderer& create(
const TextureTargetType tt_type = TTT_AUTO);
104 const TextureTargetType tt_type = TTT_AUTO);
119 void destroyAllGeometryBuffers();
122 void destroyAllTextureTargets();
126 void destroyTexture(
Texture& texture);
127 void destroyAllTextures();
128 void beginRendering();
130 void setDisplaySize(
const Size& sz);
131 const Size& getDisplaySize()
const;
132 const Vector2& getDisplayDPI()
const;
133 uint getMaxTextureSize()
const;
134 const String& getIdentifierString()
const;
150 Texture& createTexture(GLuint tex,
const Size& sz);
163 void enableExtraStateSettings(
bool setting);
179 void restoreTextures();
192 Size getAdjustedTextureSize(
const Size& sz)
const;
199 static float getNextPOTSize(
const float f);
232 void setupExtraStates();
235 void cleanupExtraStates();
238 void initialiseTextureTargetFactory(
const TextureTargetType tt_type);
241 static String d_rendererID;
251 typedef std::vector<TextureTarget*> TextureTargetList;
253 TextureTargetList d_textureTargets;
255 typedef std::vector<OpenGLGeometryBuffer*> GeometryBufferList;
257 GeometryBufferList d_geometryBuffers;
259 typedef std::vector<OpenGLTexture*> TextureList;
261 TextureList d_textures;
263 uint d_maxTextureSize;
265 bool d_initExtraStates;
267 OGLTextureTargetFactory* d_textureTargetFactory;
272 #if defined(_MSC_VER)
273 # pragma warning(pop)
276 #endif // end of guard _CEGUIOpenGLRenderer_h_