Crazy Eddie's GUI System
0.8.7
|
27 #ifndef _CEGUIIrrlichtRenderer_h_
28 #define _CEGUIIrrlichtRenderer_h_
30 #include "CEGUI/RendererModules/Irrlicht/RendererDef.h"
31 #include "../../Renderer.h"
32 #include "../../Size.h"
33 #include "../../Vector.h"
39 # pragma warning(push)
40 # pragma warning(disable : 4251)
64 class IrrlichtTexture;
65 class IrrlichtGeometryBuffer;
66 class IrrlichtResourceProvider;
67 class IrrlichtEventPusher;
68 class IrrlichtImageCodec;
96 const int abi = CEGUI_VERSION_ABI);
118 const int abi = CEGUI_VERSION_ABI);
132 irr::video::IVideoDriver& driver);
187 const String& resourceGroup);
253 #if defined(_MSC_VER)
254 # pragma warning(pop)
257 #endif // end of guard _CEGUIIrrlichtRenderer_h_
static void destroyIrrlichtImageCodec(IrrlichtImageCodec &ic)
function to destroy a CEGUI::IrrlichtImageCodec object.
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: GeometryBuffer.h:44
void destroyAllTextureTargets()
Destory all TextureTarget objects created by this Renderer.
static void destroy(IrrlichtRenderer &renderer)
Function to destroy IrrlichtRenderer objects.
TextureTargetList d_textureTargets
Container used to track texture targets.
Definition: RendererModules/Irrlicht/Renderer.h:231
bool d_supportsNSquareTextures
true if driver supports non square textures
Definition: RendererModules/Irrlicht/Renderer.h:246
void destroyGeometryBuffer(const GeometryBuffer &buffer)
Destroy a GeometryBuffer that was returned when calling the createGeometryBuffer function....
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
Definition: EventPusher.h:38
IrrlichtRenderer(irr::IrrlichtDevice &device)
Constructor.
uint d_maxTextureSize
What the renderer thinks the max texture size is.
Definition: RendererModules/Irrlicht/Renderer.h:242
void beginRendering()
Perform any operations required to put the system into a state ready for rendering operations to begi...
~IrrlichtRenderer()
Destructor.
std::vector< TextureTarget * > TextureTargetList
container type used to hold TextureTargets we create.
Definition: RendererModules/Irrlicht/Renderer.h:229
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
irr::video::IVideoDriver * d_driver
Irrlicht video driver (as obtained from the device)
Definition: RendererModules/Irrlicht/Renderer.h:221
static IrrlichtResourceProvider & createIrrlichtResourceProvider(irr::io::IFileSystem &fs)
Create a IrrlichtResourceProvider object.
Texture & getTexture(const String &name) const
Return a Texture object that was previously created by calling the createTexture functions.
static IrrlichtRenderer & create(irr::IrrlichtDevice &device, const int abi=CEGUI_VERSION_ABI)
Function to create and return IrrlichtRenderer objects.
void destroyTextureTarget(TextureTarget *target)
Function that cleans up TextureTarget objects created with the createTextureTarget function.
Sizef d_displaySize
What the renderer considers to be the current display size.
Definition: RendererModules/Irrlicht/Renderer.h:223
uint getMaxTextureSize() const
Return the pixel size of the maximum supported texture.
IrrlichtEventPusher * d_eventPusher
ptr to helper object that aids in injection of events from Irrlicht.
Definition: RendererModules/Irrlicht/Renderer.h:244
static IrrlichtRenderer & bootstrapSystem(irr::IrrlichtDevice &device, const int abi=CEGUI_VERSION_ABI)
Convenience function that creates all the Irrlicht specific objects and then initialises the CEGUI sy...
Vector2f d_displayDPI
What the renderer considers to be the current display DPI resolution.
Definition: RendererModules/Irrlicht/Renderer.h:225
void destroyTexture(const String &name)
Destroy a Texture object that was previously created by calling the createTexture functions.
bool isTextureDefined(const String &name) const
Return whether a texture with the given name exists.
bool d_supportsNPOTTextures
true if driver supports non power of two textures
Definition: RendererModules/Irrlicht/Renderer.h:248
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'...
irr::IrrlichtDevice & d_device
The IrrlichtDevide that we'll be using.
Definition: RendererModules/Irrlicht/Renderer.h:219
bool isTexCoordSystemFlipped() const
Returns if the texture coordinate system is vertically flipped or not. The original of a texture coor...
Definition: RendererModules/Irrlicht/Renderer.h:174
void throwIfNameExists(const String &name) const
helper to throw exception if name is already used.
Texture & createTexture(const String &name, const String &filename, const String &resourceGroup)
Create a Texture object using the given image file.
static void logTextureCreation(const String &name)
helper to safely log the creation of a named texture
static void destroyIrrlichtResourceProvider(IrrlichtResourceProvider &rp)
Destroy a IrrlichtResourceProvider object.
Definition: RendererModules/Irrlicht/ResourceProvider.h:40
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:54
Texture & createTexture(const String &name, const Sizef &size)
Create a Texture object with the given pixel dimensions as specified by size.
static void logTextureDestruction(const String &name)
helper to safely log the destruction of a named texture
std::vector< IrrlichtGeometryBuffer * > GeometryBufferList
container type used to hold GeometryBuffers we create.
Definition: RendererModules/Irrlicht/Renderer.h:233
GeometryBuffer & createGeometryBuffer()
Create a new GeometryBuffer and return a reference to it. You should remove the GeometryBuffer from a...
void destroyAllTextures()
Destroy all Texture objects created by this Renderer.
bool injectEvent(const irr::SEvent &event)
inject irrlicht event to CEGUI system
GeometryBufferList d_geometryBuffers
Container used to track geometry buffers.
Definition: RendererModules/Irrlicht/Renderer.h:235
ImageCodec object that loads data via image loading facilities in Irrlicht.
Definition: RendererModules/Irrlicht/ImageCodec.h:47
std::map< String, IrrlichtTexture *, StringFastLessCompare CEGUI_MAP_ALLOC(String, IrrlichtTexture *)> TextureMap
container type used to hold Textures we create.
Definition: RendererModules/Irrlicht/Renderer.h:238
RenderTarget & getDefaultRenderTarget()
Returns the default RenderTarget object. The default render target is is typically one that targets t...
void setDisplaySize(const Sizef &sz)
Set the size of the display or host window in pixels for this Renderer object.
Defines interface to some surface that can be rendered to. Concrete instances of objects that impleme...
Definition: RenderTarget.h:60
Implementation of the CEGUI::Texture class for the Irrlicht engine.
Definition: RendererModules/Irrlicht/Texture.h:50
Texture & createTexture(const String &name)
Create a 'null' Texture object.
void destroyAllGeometryBuffers()
Destroy all GeometryBuffer objects created by this Renderer.
Specialisation of RenderTarget interface that should be used as the base class for RenderTargets that...
Definition: TextureTarget.h:41
const String & getIdentifierString() const
Return identification string for the renderer module.
String class used within the GUI system.
Definition: String.h:64
static void destroySystem()
Convenience function to cleanup the CEGUI system and related objects that were created by calling the...
const Vector2f & getDisplayDPI() const
Return the resolution of the display or host window in dots per inch.
static IrrlichtImageCodec & createIrrlichtImageCodec(irr::video::IVideoDriver &driver)
function to create a CEGUI::IrrlichtImageCodec object.
TextureMap d_textures
Container used to track textures.
Definition: RendererModules/Irrlicht/Renderer.h:240
Sizef getAdjustedTextureSize(const Sizef &sz) const
Helper to return a valid texture size according to device capabilities.
const Sizef & getDisplaySize() const
Return the size of the display or host window in pixels.
Abstract class defining the basic required interface for Renderer objects.
Definition: Renderer.h:84
CEGUI::Renderer implementation for the Irrlicht engine.
Definition: RendererModules/Irrlicht/Renderer.h:72
static String d_rendererID
String holding the renderer identification text.
Definition: RendererModules/Irrlicht/Renderer.h:217
void destroyTexture(Texture &texture)
Destroy a Texture object that was previously created by calling the createTexture functions.
TextureTarget * createTextureTarget()
Create a TextureTarget that can be used to cache imagery; this is a RenderTarget that does not lose i...
RenderTarget * d_defaultTarget
The default RenderTarget.
Definition: RendererModules/Irrlicht/Renderer.h:227
void endRendering()
Perform any operations required to finalise rendering.