28 #ifndef _CEGUIRendererBase_h_
29 #define _CEGUIRendererBase_h_
31 #include "../../Base.h"
32 #include "../../Renderer.h"
33 #include "../../Size.h"
34 #include "../../Vector.h"
35 #include "../../Rect.h"
36 #include "../../TextureTarget.h"
37 #include "CEGUI/RendererModules/OpenGL/GL.h"
41 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
42 # ifdef CEGUIOPENGLRENDERER_EXPORTS
43 # define OPENGL_GUIRENDERER_API __declspec(dllexport)
45 # define OPENGL_GUIRENDERER_API __declspec(dllimport)
48 # define OPENGL_GUIRENDERER_API
52 # pragma warning(push)
53 # pragma warning(disable : 4251)
59 class OpenGLGeometryBufferBase;
70 void destroyAllGeometryBuffers();
73 void destroyAllTextureTargets();
77 const String& resourceGroup);
79 void destroyTexture(
Texture& texture);
80 void destroyTexture(
const String& name);
81 void destroyAllTextures();
83 bool isTextureDefined(
const String& name)
const;
84 void setDisplaySize(
const Sizef& sz);
85 const Sizef& getDisplaySize()
const;
86 const Vector2f& getDisplayDPI()
const;
87 uint getMaxTextureSize()
const;
88 const String& getIdentifierString()
const;
125 void enableExtraStateSettings(
bool setting);
141 void restoreTextures();
154 virtual Sizef getAdjustedTextureSize(
const Sizef& sz)
const;
161 static float getNextPOTSize(
const float f);
164 virtual void setupRenderingBlendMode(
const BlendMode mode,
165 const bool force =
false) = 0;
168 virtual bool isS3TCSupported()
const = 0;
177 virtual const mat4Pimpl* getViewProjectionMatrix();
186 virtual void setViewProjectionMatrix(
const mat4Pimpl* viewProjectionMatrix);
231 static void logTextureCreation(
const String& name);
233 static void logTextureDestruction(
const String& name);
236 void initialiseMaxTextureSize();
239 void initialiseDisplaySizeWithViewportSize();
299 #if defined(_MSC_VER)
300 # pragma warning(pop)
bool d_initExtraStates
option of whether to initialise extra states that may not be at default
Definition: RendererBase.h:271
std::vector< OpenGLGeometryBufferBase * > GeometryBufferList
container type used to hold GeometryBuffers created.
Definition: RendererBase.h:260
Functor that can be used as comparator in a std::map with String keys. It's faster than using the def...
Definition: String.h:5579
Definition: MemoryAllocatedObject.h:109
std::vector< TextureTarget * > TextureTargetList
container type used to hold TextureTargets we create.
Definition: RendererBase.h:256
TextureTargetList d_textureTargets
Container used to track texture targets.
Definition: RendererBase.h:258
RenderTarget * d_defaultTarget
The default RenderTarget.
Definition: RendererBase.h:254
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: GeometryBuffer.h:42
uint d_maxTextureSize
What the renderer thinks the max texture size is.
Definition: RendererBase.h:269
RenderTarget * d_activeRenderTarget
The active RenderTarget.
Definition: RendererBase.h:277
Specialisation of RenderTarget interface that should be used as the base class for RenderTargets that...
Definition: TextureTarget.h:40
GeometryBufferList d_geometryBuffers
Container used to track geometry buffers.
Definition: RendererBase.h:262
Sizef d_displaySize
What the renderer considers to be the current display size.
Definition: RendererBase.h:250
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:52
std::map< String, OpenGLTexture *, StringFastLessCompare CEGUI_MAP_ALLOC(String, OpenGLTexture *)> TextureMap
container type used to hold Textures we create.
Definition: RendererBase.h:265
OpenGL based implementation of the GeometryBuffer interface.
Definition: GeometryBufferBase.h:52
Abstract class defining the basic required interface for Renderer objects.
Definition: Renderer.h:82
BlendMode
Enumerated type that contains the valid options that specify the type of blending that is to be perfo...
Definition: Renderer.h:61
Definition: RendererBase.h:287
Defines interface to some surface that can be rendered to. Concrete instances of objects that impleme...
Definition: RenderTarget.h:57
TextureMap d_textures
Container used to track textures.
Definition: RendererBase.h:267
static String d_rendererID
String holding the renderer identification text.
Definition: RendererBase.h:248
Common base class used for other OpenGL based renderer modules.
Definition: RendererBase.h:63
Vector2f d_displayDPI
What the renderer considers to be the current display DPI resolution.
Definition: RendererBase.h:252
Definition: GlmPimpl.h:36
BlendMode d_activeBlendMode
What blend mode we think is active.
Definition: RendererBase.h:273
Texture implementation for the OpenGLRenderer.
Definition: RendererModules/OpenGL/Texture.h:44
String class used within the GUI system.
Definition: String.h:62
mat4Pimpl * d_viewProjectionMatrix
View projection matrix.
Definition: RendererBase.h:275