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;
70 class OgreGeometryBuffer;
72 class OgreResourceProvider;
74 class OgreWindowTarget;
75 struct OgreRenderer_impl;
106 static OgreRenderer& bootstrapSystem(
const int abi = CEGUI_VERSION_ABI);
132 static OgreRenderer& bootstrapSystem(Ogre::RenderTarget& target,
133 const int abi = CEGUI_VERSION_ABI);
151 static void destroySystem();
163 static OgreRenderer& create(
const int abi = CEGUI_VERSION_ABI);
171 const int abi = CEGUI_VERSION_ABI);
189 void setRenderingEnabled(
const bool enabled);
192 bool isRenderingEnabled()
const;
211 Texture& createTexture(
const String& name, Ogre::TexturePtr& tex,
212 bool take_ownership =
false);
215 void setupRenderingBlendMode(
const BlendMode mode,
216 const bool force =
false);
235 void setFrameControlExecutionEnabled(
const bool enabled);
254 bool isFrameControlExecutionEnabled()
const;
264 void initialiseRenderStateSettings();
275 void setDefaultRootRenderTarget(Ogre::RenderTarget& target);
286 bool isUsingShaders()
const;
306 void setUsingShaders(
const bool use_shaders);
326 void updateShaderParams()
const;
329 void setWorldMatrix(
const Ogre::Matrix4& m);
331 void setViewMatrix(
const Ogre::Matrix4& m);
333 void setProjectionMatrix(
const Ogre::Matrix4& m);
335 const Ogre::Matrix4& getWorldMatrix()
const;
337 const Ogre::Matrix4& getViewMatrix()
const;
339 const Ogre::Matrix4& getProjectionMatrix()
const;
351 const Ogre::Matrix4& getWorldViewProjMatrix()
const;
357 void destroyAllGeometryBuffers();
360 void destroyAllTextureTargets();
364 const String& resourceGroup);
366 void destroyTexture(
Texture& texture);
367 void destroyTexture(
const String& name);
368 void destroyAllTextures();
370 bool isTextureDefined(
const String& name)
const;
371 void beginRendering();
373 void setDisplaySize(
const Sizef& sz);
374 const Sizef& getDisplaySize()
const;
375 const Vector2f& getDisplayDPI()
const;
376 uint getMaxTextureSize()
const;
377 const String& getIdentifierString()
const;
388 void checkOgreInitialised();
390 void throwIfNameExists(
const String& name)
const;
392 static void logTextureCreation(
const String& name);
394 static void logTextureDestruction(
const String& name);
397 void constructor_impl(Ogre::RenderTarget& target);
399 void initialiseShaders();
401 void cleanupShaders();
410 #if defined(_MSC_VER)
411 # pragma warning(pop)
414 #endif // end of guard _CEGUIOgreRenderer_h_