27 #ifndef _CEGUIOgreRenderer_h_
28 #define _CEGUIOgreRenderer_h_
30 #include "../../Renderer.h"
31 #include "../../Size.h"
32 #include "../../Vector.h"
33 #include "CEGUI/Config.h"
37 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
38 # ifdef CEGUIOGRERENDERER_EXPORTS
39 # define OGRE_GUIRENDERER_API __declspec(dllexport)
41 # define OGRE_GUIRENDERER_API __declspec(dllimport)
44 # define OGRE_GUIRENDERER_API
48 # pragma warning(push)
49 # pragma warning(disable : 4251)
57 #if (CEGUI_OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
60 template<
typename T>
class SharedPtr;
62 typedef SharedPtr<Texture> TexturePtr;
67 #if (CEGUI_OGRE_VERSION >= (2 << 16))
70 #define CEGUI_USE_OGRE_COMPOSITOR2
73 #if (CEGUI_OGRE_VERSION >= ((2 << 16) | (1 << 8) | 0))
75 #define CEGUI_USE_OGRE_HLMS
76 #include <OgreRenderOperation.h>
77 #include <OgreHlmsSamplerblock.h>
83 class OgreGeometryBuffer;
85 class OgreResourceProvider;
87 class OgreWindowTarget;
88 struct OgreRenderer_impl;
94 #if !defined(CEGUI_USE_OGRE_COMPOSITOR2)
120 static OgreRenderer& bootstrapSystem(
const int abi = CEGUI_VERSION_ABI);
146 static OgreRenderer& bootstrapSystem(Ogre::RenderTarget& target,
147 const int abi = CEGUI_VERSION_ABI);
165 static void destroySystem();
167 #if !defined(CEGUI_USE_OGRE_COMPOSITOR2)
178 static OgreRenderer& create(
const int abi = CEGUI_VERSION_ABI);
187 const int abi = CEGUI_VERSION_ABI);
205 void setRenderingEnabled(
const bool enabled);
208 bool isRenderingEnabled()
const;
227 Texture& createTexture(
const String& name, Ogre::TexturePtr& tex,
228 bool take_ownership =
false);
231 void setupRenderingBlendMode(
const BlendMode mode,
232 const bool force =
false);
251 void setFrameControlExecutionEnabled(
const bool enabled);
270 bool isFrameControlExecutionEnabled()
const;
280 void initialiseRenderStateSettings();
291 void setDefaultRootRenderTarget(Ogre::RenderTarget& target);
302 bool isUsingShaders()
const;
322 void setUsingShaders(
const bool use_shaders);
342 void updateShaderParams()
const;
345 void setWorldMatrix(
const Ogre::Matrix4& m);
347 void setViewMatrix(
const Ogre::Matrix4& m);
349 void setProjectionMatrix(
const Ogre::Matrix4& m);
351 const Ogre::Matrix4& getWorldMatrix()
const;
353 const Ogre::Matrix4& getViewMatrix()
const;
355 const Ogre::Matrix4& getProjectionMatrix()
const;
367 const Ogre::Matrix4& getWorldViewProjMatrix()
const;
386 #ifdef CEGUI_USE_OGRE_HLMS
387 Ogre::RenderTarget* getOgreRenderTarget();
388 const Ogre::HlmsSamplerblock* getHlmsSamplerblock();
395 void destroyAllGeometryBuffers();
398 void destroyAllTextureTargets();
402 const String& resourceGroup);
404 void destroyTexture(
Texture& texture);
405 void destroyTexture(
const String& name);
406 void destroyAllTextures();
408 bool isTextureDefined(
const String& name)
const;
409 void beginRendering();
411 void setDisplaySize(
const Sizef& sz);
412 const Sizef& getDisplaySize()
const;
413 const Vector2f& getDisplayDPI()
const;
414 uint getMaxTextureSize()
const;
415 const String& getIdentifierString()
const;
426 void checkOgreInitialised();
428 void throwIfNameExists(
const String& name)
const;
430 static void logTextureCreation(
const String& name);
432 static void logTextureDestruction(
const String& name);
435 void constructor_impl(Ogre::RenderTarget& target);
437 void initialiseShaders();
439 void cleanupShaders();
448 #if defined(_MSC_VER)
449 # pragma warning(pop)
452 #endif // end of guard _CEGUIOgreRenderer_h_
CEGUI::Renderer implementation for the Ogre engine.
Definition: RendererModules/Ogre/Renderer.h:91
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
ImageCodec object that loads data via image loading facilities in Ogre.
Definition: RendererModules/Ogre/ImageCodec.h:40
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: GeometryBuffer.h:42
Definition: RendererModules/Ogre/ResourceProvider.h:38
Specialisation of RenderTarget interface that should be used as the base class for RenderTargets that...
Definition: TextureTarget.h:40
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:52
bool isTexCoordSystemFlipped() const
Returns if the texture coordinate system is vertically flipped or not. The original of a texture coor...
Definition: RendererModules/Ogre/Renderer.h:384
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
OgreRenderer_impl * d_pimpl
Pointer to the hidden implementation data.
Definition: RendererModules/Ogre/Renderer.h:442
Definition: RendererModules/Ogre/GeometryBuffer.h:48
Defines interface to some surface that can be rendered to. Concrete instances of objects that impleme...
Definition: RenderTarget.h:57
String class used within the GUI system.
Definition: String.h:62