Crazy Eddie's GUI System
0.8.7
|
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;
67 const String& resourceGroup);
155 const bool force =
false) = 0;
247 void init (
bool init_glew=
false,
bool set_glew_experimental=
false);
321 #if defined(_MSC_VER)
322 # pragma warning(pop)
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: GeometryBuffer.h:44
const String & getIdentifierString() const
Return identification string for the renderer module.
const CEGUI::Rectf & getActiveViewPort()
Helper to get the viewport.
virtual void setupRenderingBlendMode(const BlendMode mode, const bool force=false)=0
set the render states for the specified BlendMode.
void initialiseDisplaySizeWithViewportSize()
helper to set display size with current viewport size.
OpenGLRendererBase(const Sizef &display_size, bool set_glew_experimental)
Constructor.
TextureTargetList d_textureTargets
Container used to track texture targets.
Definition: RendererBase.h:280
Texture & createTexture(const String &name, const String &filename, const String &resourceGroup)
Create a Texture object using the given image file.
Functor that can be used as comparator in a std::map with String keys. It's faster than using the def...
Definition: String.h:5580
TextureTarget * createTextureTarget()
Create a TextureTarget that can be used to cache imagery; this is a RenderTarget that does not lose i...
void setActiveRenderTarget(RenderTarget *renderTarget)
Helper to set the active render target.
virtual ~OpenGLRendererBase()
Destructor!
Texture & createTexture(const String &name)
Create a 'null' Texture object.
OpenGLRendererBase(const Sizef &display_size)
Constructor.
virtual OpenGLGeometryBufferBase * createGeometryBuffer_impl()=0
return some appropriate OpenGLGeometryBufferBase subclass instance.
uint d_maxTextureSize
What the renderer thinks the max texture size is.
Definition: RendererBase.h:291
GeometryBufferList d_geometryBuffers
Container used to track geometry buffers.
Definition: RendererBase.h:284
void enableExtraStateSettings(bool setting)
Tells the renderer to initialise some extra states beyond what it directly needs itself for CEGUI.
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Texture implementation for the OpenGLRenderer.
Definition: RendererModules/OpenGL/Texture.h:45
virtual TextureTarget * createTextureTarget_impl()=0
return some appropriate TextureTarget subclass instance.
RenderTarget & getDefaultRenderTarget()
Returns the default RenderTarget object. The default render target is is typically one that targets t...
BlendMode d_activeBlendMode
What blend mode we think is active.
Definition: RendererBase.h:295
std::vector< TextureTarget * > TextureTargetList
container type used to hold TextureTargets we create.
Definition: RendererBase.h:278
virtual Sizef getAdjustedTextureSize(const Sizef &sz) const
Helper to return a valid texture size according to reported OpenGL capabilities.
void destroyTexture(Texture &texture)
Destroy a Texture object that was previously created by calling the createTexture functions.
Definition: MemoryAllocatedObject.h:110
void destroyAllTextures()
Destroy all Texture objects created by this Renderer.
void restoreTextures()
Restores all the loaded textures from the local data buffers previously created by 'grabTextures'.
bool isTextureDefined(const String &name) const
Return whether a texture with the given name exists.
virtual const mat4Pimpl * getViewProjectionMatrix()
Helper to return view projection matrix.
Definition: GlmPimpl.h:37
void setDisplaySize(const Sizef &sz)
Set the size of the display or host window in pixels for this Renderer object.
void destroyGeometryBuffer(const GeometryBuffer &buffer)
Destroy a GeometryBuffer that was returned when calling the createGeometryBuffer function....
const Sizef & getDisplaySize() const
Return the size of the display or host window in pixels.
static String d_rendererID
String holding the renderer identification text.
Definition: RendererBase.h:270
virtual void setViewProjectionMatrix(const mat4Pimpl *viewProjectionMatrix)
Helper to set the view projection matrix.
void destroyTexture(const String &name)
Destroy a Texture object that was previously created by calling the createTexture functions.
Vector2f d_displayDPI
What the renderer considers to be the current display DPI resolution.
Definition: RendererBase.h:274
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:54
void destroyAllTextureTargets()
Destory all TextureTarget objects created by this Renderer.
static void logTextureDestruction(const String &name)
helper to safely log the destruction of a named texture
static void logTextureCreation(const String &name)
helper to safely log the creation of a named texture
void destroyTextureTarget(TextureTarget *target)
Function that cleans up TextureTarget objects created with the createTextureTarget function.
bool d_initExtraStates
option of whether to initialise extra states that may not be at default
Definition: RendererBase.h:293
RenderTarget * d_defaultTarget
The default RenderTarget.
Definition: RendererBase.h:276
OpenGL based implementation of the GeometryBuffer interface.
Definition: GeometryBufferBase.h:53
BlendMode
Enumerated type that contains the valid options that specify the type of blending that is to be perfo...
Definition: Renderer.h:62
Sizef d_displaySize
What the renderer considers to be the current display size.
Definition: RendererBase.h:272
Texture & createTexture(const String &name, const Sizef &size)
Create a Texture object with the given pixel dimensions as specified by size.
static float getNextPOTSize(const float f)
Utility function that will return f if it's a power of two, or the next power of two up from f if it'...
std::map< String, OpenGLTexture *, StringFastLessCompare CEGUI_MAP_ALLOC(String, OpenGLTexture *)> TextureMap
container type used to hold Textures we create.
Definition: RendererBase.h:287
bool isTexCoordSystemFlipped() const
Returns if the texture coordinate system is vertically flipped or not. The original of a texture coor...
Definition: RendererBase.h:220
Texture & createTexture(const String &name, GLuint tex, const Sizef &sz)
Create a texture that uses an existing OpenGL texture with the specified size. Note that it is your r...
Defines interface to some surface that can be rendered to. Concrete instances of objects that impleme...
Definition: RenderTarget.h:60
Texture & getTexture(const String &name) const
Return a Texture object that was previously created by calling the createTexture functions.
virtual bool isS3TCSupported() const =0
RenderTarget * getActiveRenderTarget()
Helper to get the active render target.
Specialisation of RenderTarget interface that should be used as the base class for RenderTargets that...
Definition: TextureTarget.h:41
String class used within the GUI system.
Definition: String.h:64
std::vector< OpenGLGeometryBufferBase * > GeometryBufferList
container type used to hold GeometryBuffers created.
Definition: RendererBase.h:282
void grabTextures()
Grabs all the loaded textures from Texture RAM and stores them in a local data buffer....
const Vector2f & getDisplayDPI() const
Return the resolution of the display or host window in dots per inch.
Abstract class defining the basic required interface for Renderer objects.
Definition: Renderer.h:84
void initialiseMaxTextureSize()
helper to set (rough) max texture size.
Common base class used for other OpenGL (desktop or ES) based renderer modules.
Definition: RendererBase.h:54
GeometryBuffer & createGeometryBuffer()
Create a new GeometryBuffer and return a reference to it. You should remove the GeometryBuffer from a...
uint getMaxTextureSize() const
Return the pixel size of the maximum supported texture.
void destroyAllGeometryBuffers()
Destroy all GeometryBuffer objects created by this Renderer.
TextureMap d_textures
Container used to track textures.
Definition: RendererBase.h:289
RenderTarget * d_activeRenderTarget
The active RenderTarget.
Definition: RendererBase.h:299
mat4Pimpl * d_viewProjectionMatrix
View projection matrix.
Definition: RendererBase.h:297
Definition: RendererBase.h:311