5 #ifndef BALL_VIEW_RENDERING_RENDERSETUP_H
6 #define BALL_VIEW_RENDERING_RENDERSETUP_H
8 #ifndef BALL_VIEW_RENDERING_GLRENDERER_H
12 #ifndef BALL_VIEW_RENDERING_RENDERTARGET_H
16 #ifndef BALL_VIEW_RENDERING_GLRENDERWINDOW_H
20 #ifndef BALL_SYSTEM_MUTEX_H
24 #include <QtCore/QThread>
25 #include <QtCore/QWaitCondition>
27 #include <boost/enable_shared_from_this.hpp>
45 :
public QThread,
public boost::enable_shared_from_this<RenderSetup>
98 void resize(
Size width,
Size height);
117 bool isPaused()
const {
return rendering_paused_; }
149 void updateCamera(
const Camera* camera = 0);
156 void setOffset(
const Vector3& offset);
184 void renderToBuffer();
188 bool exportPNG(
const String& filename);
192 void setLights(
bool reset_all =
false);
196 void updateBackgroundColor();
200 void setupEnvironmentMap(
const QImage& image);
238 void showRuler(
bool show);
244 void projectionModeChanged();
248 void useContinuousLoop(
bool use_loop);
288 virtual void makeCurrent();
292 void lock() { render_mutex_.lock(); }
293 void unlock() { render_mutex_.unlock(); }
303 bool isReadyToSwap();
312 void makeDependentOn(boost::shared_ptr<RenderSetup>& partner) { keep_in_sync_.push_back(partner); }
316 void renderToBuffer_();
377 boost::shared_ptr<RenderSetup>
getRenderer() {
return renderer_; }
Renders into a POVRay file.
RenderToBufferFinishedEvent(boost::shared_ptr< RenderSetup > renderer)
void exportPNGAfterTTL(String filename)
GLRenderWindow * gl_target_
void setReceiveBufferUpdates(bool do_receive)
Standard OpenGL renderer.
std::deque< boost::shared_ptr< RenderSetup > > keep_in_sync_
void setBufferReady(bool is_ready)
STEREO_SETUP stereo_setup_
boost::shared_ptr< RenderSetup > renderer_
RendererType getRendererType()
GLRenderer * gl_renderer_
bool bufferIsReady()
Returns true if the buffer has been filled and just waits for painting.
RendererType renderer_type_
bool use_continuous_loop_
QWaitCondition wait_for_render
Renders into a VRML file.
Event posted by renderers after a new buffer is available.
boost::shared_ptr< RenderSetup > getRenderer()
std::deque< boost::shared_ptr< RenderSetup > > & getDependentRenderers()
Used for offscreen rendering.
void setTimeToLive(int ttl)
void makeDependentOn(boost::shared_ptr< RenderSetup > &partner)
Renders into an STL file.
String export_after_ttl_filename_
int getTimeToLive() const
bool receivesBufferUpdates() const
void setStereoMode(STEREO_SETUP stereo)