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;
103 const TextureTargetType tt_type = TTT_AUTO);
129 const TextureTargetType tt_type = TTT_AUTO);
146 static void destroySystem();
156 static OpenGLRenderer& create(
const TextureTargetType tt_type = TTT_AUTO);
170 const TextureTargetType tt_type = TTT_AUTO);
185 void destroyAllGeometryBuffers();
188 void destroyAllTextureTargets();
192 void destroyTexture(
Texture& texture);
193 void destroyAllTextures();
194 void beginRendering();
196 void setDisplaySize(
const Size& sz);
197 const Size& getDisplaySize()
const;
198 const Vector2& getDisplayDPI()
const;
199 uint getMaxTextureSize()
const;
200 const String& getIdentifierString()
const;
216 Texture& createTexture(GLuint tex,
const Size& sz);
229 void enableExtraStateSettings(
bool setting);
245 void restoreTextures();
258 Size getAdjustedTextureSize(
const Size& sz)
const;
265 static float getNextPOTSize(
const float f);
268 void setupRenderingBlendMode(
const BlendMode mode,
const bool force =
false);
301 void setupExtraStates();
304 void cleanupExtraStates();
307 void initialiseTextureTargetFactory(
const TextureTargetType tt_type);
310 static String d_rendererID;
320 typedef std::vector<TextureTarget*> TextureTargetList;
322 TextureTargetList d_textureTargets;
324 typedef std::vector<OpenGLGeometryBuffer*> GeometryBufferList;
326 GeometryBufferList d_geometryBuffers;
328 typedef std::vector<OpenGLTexture*> TextureList;
330 TextureList d_textures;
332 uint d_maxTextureSize;
334 bool d_initExtraStates;
336 OGLTextureTargetFactory* d_textureTargetFactory;
343 #if defined(_MSC_VER)
344 # pragma warning(pop)
347 #endif // end of guard _CEGUIOpenGLRenderer_h_