Commit c156ffde authored by Mike Kremer's avatar Mike Kremer
Browse files

Added new functions to control multipass rendering.

The parameters (max_render_passes and render_pass) are not OpenGL controlled
and have to be set manually.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7627 383ad7c9-94d9-4d36-a494-682f7c89f535
parent f4238577
......@@ -73,7 +73,8 @@ const float GLState::default_shininess(100.0);
GLState::GLState(bool _updateGL)
: render_pass_(0),
: render_pass_(1),
max_render_passes_(1),
multisampling_(false),
allow_multisampling_(true),
updateGL_(_updateGL),
......
......@@ -365,22 +365,38 @@ public:
/// get line width
float line_width() const { return line_width_; }
//--- render passes ---------------------------------------------------------
//===========================================================================
/** @name Render pass controls
* @{ */
//===========================================================================
public:
/// get current render pass counter
unsigned int render_pass() const { return render_pass_; }
/// reset render pass counter
void reset_render_pass() { render_pass_ = 0; }
void reset_render_pass() { render_pass_ = 1; }
/// increment render pass counter
void next_render_pass() { ++render_pass_; }
/// get maximum number of render passes
unsigned int max_render_passes() const { return max_render_passes_; }
/// set maximum number of render passes
void set_max_render_passes(const unsigned int _max) { max_render_passes_ = _max; }
private:
/// holds the current render pass number (1-indexed)
/// this has to be set externally
unsigned int render_pass_;
/// holds the maximum render pass number
/// this has to be set externally
unsigned int max_render_passes_;
/** @} */
//--- misc ------------------------------------------------------------------
public:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment