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"
42 # pragma warning(push)
43 # pragma warning(disable : 4251)
49 class OpenGLGeometryBufferBase;
53 class OPENGL_GUIRENDERER_API OpenGLRendererBase :
public Renderer
57 RenderTarget& getDefaultRenderTarget();
58 GeometryBuffer& createGeometryBuffer();
59 void destroyGeometryBuffer(
const GeometryBuffer& buffer);
60 void destroyAllGeometryBuffers();
61 TextureTarget* createTextureTarget();
62 void destroyTextureTarget(TextureTarget* target);
63 void destroyAllTextureTargets();
64 Texture& createTexture(
const String& name);
65 Texture& createTexture(
const String& name,
66 const String& filename,
67 const String& resourceGroup);
68 Texture& createTexture(
const String& name,
const Sizef& size);
69 void destroyTexture(Texture& texture);
70 void destroyTexture(
const String& name);
71 void destroyAllTextures();
72 Texture& getTexture(
const String& name)
const;
73 bool isTextureDefined(
const String& name)
const;
74 void setDisplaySize(
const Sizef& sz);
75 const Sizef& getDisplaySize()
const;
76 const Vector2f& getDisplayDPI()
const;
77 uint getMaxTextureSize()
const;
78 const String& getIdentifierString()
const;
102 Texture& createTexture(
const String& name, GLuint tex,
const Sizef& sz);
115 void enableExtraStateSettings(
bool setting);
131 void restoreTextures();
144 virtual Sizef getAdjustedTextureSize(
const Sizef& sz)
const;
151 static float getNextPOTSize(
const float f);
154 virtual void setupRenderingBlendMode(
const BlendMode mode,
155 const bool force =
false) = 0;
158 virtual bool isS3TCSupported()
const = 0;
167 virtual const mat4Pimpl* getViewProjectionMatrix();
176 virtual void setViewProjectionMatrix(
const mat4Pimpl* viewProjectionMatrix);
194 void setActiveRenderTarget(RenderTarget* renderTarget);
203 RenderTarget* getActiveRenderTarget();
247 void init (
bool init_glew=
false,
bool set_glew_experimental=
false);
253 static void logTextureCreation(
const String& name);
255 static void logTextureDestruction(
const String& name);
258 void initialiseMaxTextureSize();
261 void initialiseDisplaySizeWithViewportSize();
270 static String d_rendererID;
280 TextureTargetList d_textureTargets;
284 GeometryBufferList d_geometryBuffers;
291 uint d_maxTextureSize;
293 bool d_initExtraStates;
314 virtual ~OGLTextureTargetFactory() {}
315 virtual TextureTarget* create(OpenGLRendererBase&)
const
321 #if defined(_MSC_VER)
322 # pragma warning(pop)
std::vector< OpenGLGeometryBufferBase * > GeometryBufferList
container type used to hold GeometryBuffers created.
Definition: debian/tmp/usr/include/cegui-0.8.7/CEGUI/RendererModules/OpenGL/RendererBase.h:282
bool isTexCoordSystemFlipped() const
Returns if the texture coordinate system is vertically flipped or not. The original of a texture coor...
Definition: debian/tmp/usr/include/cegui-0.8.7/CEGUI/RendererModules/OpenGL/RendererBase.h:220
Functor that can be used as comparator in a std::map with String keys. It's faster than using the def...
Definition: cegui/include/CEGUI/String.h:5579
Definition: cegui/include/CEGUI/MemoryAllocatedObject.h:109
std::vector< TextureTarget * > TextureTargetList
container type used to hold TextureTargets we create.
Definition: debian/tmp/usr/include/cegui-0.8.7/CEGUI/RendererModules/OpenGL/RendererBase.h:278
Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42
Specialisation of RenderTarget interface that should be used as the base class for RenderTargets that...
Definition: cegui/include/CEGUI/TextureTarget.h:40
std::map< String, OpenGLTexture *, StringFastLessCompare CEGUI_MAP_ALLOC(String, OpenGLTexture *)> TextureMap
container type used to hold Textures we create.
Definition: debian/tmp/usr/include/cegui-0.8.7/CEGUI/RendererModules/OpenGL/RendererBase.h:287
OpenGL based implementation of the GeometryBuffer interface.
Definition: cegui/include/CEGUI/RendererModules/OpenGL/GeometryBufferBase.h:52
BlendMode
Enumerated type that contains the valid options that specify the type of blending that is to be perfo...
Definition: cegui/include/CEGUI/Renderer.h:61
Definition: cegui/include/CEGUI/RendererModules/OpenGL/RendererBase.h:309
Defines interface to some surface that can be rendered to. Concrete instances of objects that impleme...
Definition: cegui/include/CEGUI/RenderTarget.h:57
Common base class used for other OpenGL (desktop or ES) based renderer modules.
Definition: cegui/include/CEGUI/RendererModules/OpenGL/RendererBase.h:53
Definition: cegui/include/CEGUI/RendererModules/OpenGL/GlmPimpl.h:36
Texture implementation for the OpenGLRenderer.
Definition: cegui/include/CEGUI/RendererModules/OpenGL/Texture.h:44
String class used within the GUI system.
Definition: cegui/include/CEGUI/String.h:62