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_
Class used as a two dimensional vector (aka a Point)
Definition: CEGUIVector.h:45
Use targets based on pbuffer support if available, else none.
Definition: CEGUIOpenGLRenderer.h:77
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: CEGUIGeometryBuffer.h:42
Class that holds the size (width & height) of something.
Definition: CEGUISize.h:43
Specialisation of RenderTarget interface that should be used as the base class for RenderTargets that...
Definition: CEGUITextureTarget.h:41
Use targets based on frame buffer objects if available, else none.
Definition: CEGUIOpenGLRenderer.h:75
Automatically choose the best type available.
Definition: CEGUIOpenGLRenderer.h:73
Abstract base class specifying the required interface for Texture objects.
Definition: CEGUITexture.h:50
Abstract class defining the basic required interface for Renderer objects.
Definition: CEGUIRenderer.h:80
BlendMode
Enumerated type that contains the valid options that specify the type of blending that is to be perfo...
Definition: CEGUIRenderer.h:59
Renderer class to interface with OpenGL.
Definition: CEGUIOpenGLRenderer.h:66
Definition: CEGUIRenderingRoot.h:36
Defines interface to some surface that can be rendered to. Concrete instances of objects that impleme...
Definition: CEGUIRenderTarget.h:42
TextureTargetType
Enumeration of valid texture target types.
Definition: CEGUIOpenGLRenderer.h:70
String class used within the GUI system.
Definition: CEGUIString.h:57