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 );
80 virtual QSize
sizeHint ()
const {
return QSize( 320, 240 ); }
88 Ogre::Viewport* getViewport()
const;
92 void setCamera( Ogre::Camera* camera );
100 void setOrthoScale(
float scale );
106 bool enableStereo(
bool enable);
115 void setOverlaysEnabled(
bool overlays_enabled );
116 void setBackgroundColor( Ogre::ColourValue color );
119 virtual void paintEvent( QPaintEvent* e );
120 virtual void resizeEvent( QResizeEvent* event );
124 virtual void preViewportUpdate(
const Ogre::RenderTargetViewportEvent& evt);
125 virtual void postViewportUpdate(
const Ogre::RenderTargetViewportEvent& evt);
130 void setCameraAspectRatio();
136 void prepareStereoViewport(Ogre::Viewport*);
163 #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)
virtual QSize sizeHint() const
boost::function< void()> post_render_callback_
Functor which is called after each render.
Ogre::Viewport * right_viewport_
Ogre::ColourValue background_color_
Ogre::Camera * right_camera_
Ogre::Camera * getCamera() const
Ogre::Viewport * viewport_
Ogre::Camera * left_camera_