File OgreView.h¶
-
namespace
Gsage -
class
OgreView: public EventSubscriber<OgreView> - #include <OgreView.h>
Allows displaying ogre camera into imgui window.
Lua usage example:
-- create ogre viewport viewport = imgui.createOgreView("#000000FF") local textureID = "myOgreView" -- render camera to texture local cam = camera:create("free") cam:renderToTexture(textureID, { autoUpdated = false }) -- set ogre view texture viewport:setTextureID(textureID) -- update on each imgui render call viewport:render(320, 240)
Public Functions
-
OgreView(OgreRenderSystem *render, ImVec4 bgColour)¶
-
virtual
~OgreView()¶
-
void
render(unsigned int width, unsigned int height)¶ Render ogre view
-
void
setTexture(TexturePtr texture)¶ Sets rendered manual texture object
- Parameters
texture: Texture object
-
bool
setTexture(const std::string &id)¶ Sets texture by texture id
- Return
true if succeed
- Parameters
id: texture id
Private Functions
-
void
setTextureID(const std::string &textureID)¶ Sets rendered texture id
- Parameters
textureID: RTT texture
-
bool
onTextureEvent(EventDispatcher *sender, const Event &event)¶
Private Members
-
std::string
mTextureID¶
-
TexturePtr
mTexture¶
-
OgreRenderSystem *
mRender¶
-
unsigned int
mWidth¶
-
unsigned int
mHeight¶
-
ViewportRenderData *
mViewport¶
-
ImVec2
mPosition¶
-
ImVec4
mBgColour¶
-
-
class