Commit 9953f38a authored by Marcel Campen's avatar Marcel Campen
Browse files

Added ability to render meshes with glPolygonOffset



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@19715 383ad7c9-94d9-4d36-a494-682f7c89f535
parent f5ce2495
......@@ -218,6 +218,12 @@ draw(GLState& _state, const DrawModes::DrawMode& _drawMode) {
glPushAttrib(GL_ENABLE_BIT);
if(draw_with_offset_)
{
ACG::GLState::enable(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(0.001f, 0.0f);
}
/// get bound texture buffer and target
GLuint lastBuffer = ACG::GLState::getBoundTextureBuffer();
GLenum lastTarget = ACG::GLState::getBoundTextureTarget();
......
......@@ -508,6 +508,12 @@ public:
/** \brief measures the size in bytes of allocated memory
*/
unsigned int getMemoryUsage();
private:
bool draw_with_offset_;
public:
void set_offset(bool enable) { draw_with_offset_ = enable; }
};
//=============================================================================
......
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