29 #ifndef QT_OGRE_RENDER_WINDOW_OGRE_RENDER_WINDOW_H_ 30 #define QT_OGRE_RENDER_WINDOW_OGRE_RENDER_WINDOW_H_ 32 #include <boost/function.hpp> 36 #include <OgreColourValue.h> 37 #include <OgreRenderTargetListener.h> 69 virtual void setPreRenderCallback(boost::function<
void()> func);
74 virtual void setPostRenderCallback(boost::function<
void()> func);
82 return QSize(320, 240);
91 Ogre::Viewport* getViewport()
const;
95 void setCamera(Ogre::Camera* camera);
106 void setOrthoScale(
float scale);
112 bool enableStereo(
bool enable);
119 auto_render_ = auto_render;
124 void setOverlaysEnabled(
bool overlays_enabled);
125 void setBackgroundColor(Ogre::ColourValue color);
128 void paintEvent(QPaintEvent* e)
override;
129 void resizeEvent(QResizeEvent* event)
override;
133 void preViewportUpdate(
const Ogre::RenderTargetViewportEvent& evt)
override;
134 void postViewportUpdate(
const Ogre::RenderTargetViewportEvent& evt)
override;
139 void setCameraAspectRatio();
145 void prepareStereoViewport(Ogre::Viewport*);
172 #endif // QT_OGRE_RENDER_WINDOW_OGRE_RENDER_WINDOW_H_
boost::function< void()> pre_render_callback_
Functor which is called before each render.
void setAutoRender(bool auto_render)
Ogre::Camera * getCamera() const
Ogre::Viewport * right_viewport_
Ogre::ColourValue background_color_
boost::function< void()> post_render_callback_
Functor which is called after each render.
Ogre::Camera * right_camera_
QSize sizeHint() const override
Ogre::Viewport * viewport_
Ogre::Camera * left_camera_