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_; }