28 #ifndef _CEGUIOgreRenderer_h_
29 #define _CEGUIOgreRenderer_h_
31 #include "../../Renderer.h"
32 #include "../../Size.h"
33 #include "../../Vector.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)
64 class OgreGeometryBuffer;
66 class OgreResourceProvider;
68 class OgreWindowTarget;
69 struct OgreRenderer_impl;
100 static OgreRenderer& bootstrapSystem(
const int abi = CEGUI_VERSION_ABI);
126 static OgreRenderer& bootstrapSystem(Ogre::RenderTarget& target,
127 const int abi = CEGUI_VERSION_ABI);
145 static void destroySystem();
157 static OgreRenderer& create(
const int abi = CEGUI_VERSION_ABI);
165 const int abi = CEGUI_VERSION_ABI);
183 void setRenderingEnabled(
const bool enabled);
186 bool isRenderingEnabled()
const;
205 Texture& createTexture(
const String& name, Ogre::TexturePtr& tex,
206 bool take_ownership =
false);
209 void setupRenderingBlendMode(
const BlendMode mode,
210 const bool force =
false);
229 void setFrameControlExecutionEnabled(
const bool enabled);
248 bool isFrameControlExecutionEnabled()
const;
258 void initialiseRenderStateSettings();
269 void setDefaultRootRenderTarget(Ogre::RenderTarget& target);
280 bool isUsingShaders()
const;
300 void setUsingShaders(
const bool use_shaders);
320 void updateShaderParams()
const;
323 void setWorldMatrix(
const Ogre::Matrix4& m);
325 void setViewMatrix(
const Ogre::Matrix4& m);
327 void setProjectionMatrix(
const Ogre::Matrix4& m);
329 const Ogre::Matrix4& getWorldMatrix()
const;
331 const Ogre::Matrix4& getViewMatrix()
const;
333 const Ogre::Matrix4& getProjectionMatrix()
const;
345 const Ogre::Matrix4& getWorldViewProjMatrix()
const;
351 void destroyAllGeometryBuffers();
354 void destroyAllTextureTargets();
358 const String& resourceGroup);
360 void destroyTexture(
Texture& texture);
361 void destroyTexture(
const String& name);
362 void destroyAllTextures();
364 bool isTextureDefined(
const String& name)
const;
365 void beginRendering();
367 void setDisplaySize(
const Sizef& sz);
368 const Sizef& getDisplaySize()
const;
369 const Vector2f& getDisplayDPI()
const;
370 uint getMaxTextureSize()
const;
371 const String& getIdentifierString()
const;
382 void checkOgreInitialised();
384 void throwIfNameExists(
const String& name)
const;
386 static void logTextureCreation(
const String& name);
388 static void logTextureDestruction(
const String& name);
391 void constructor_impl(Ogre::RenderTarget& target);
393 void initialiseShaders();
395 void cleanupShaders();
404 #if defined(_MSC_VER)
405 # pragma warning(pop)
408 #endif // end of guard _CEGUIOgreRenderer_h_