Commit d8b9536f authored by Christopher Tenter's avatar Christopher Tenter
Browse files

fix for linenode renderobject refs #1305

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15867 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 46c1ebb8
......@@ -374,10 +374,14 @@ getRenderObjects(IRenderer* _renderer, GLState& _state , const DrawModes::DrawM
// init base render object
RenderObject ro;
memset(&ro, 0, sizeof(RenderObject));
ro.initFromState(&_state);
ro.setMaterial(_mat);
ro.debugName = "LineNode";
// draw after scene-meshes
ro.priority = 1;
if (line_mode_ == LineSegmentsMode)
{
......@@ -438,7 +442,9 @@ getRenderObjects(IRenderer* _renderer, GLState& _state , const DrawModes::DrawM
ro.vertexBuffer = vbo_;
VertexDeclaration vertexDecl;
// decl must be static or member, renderer does not make a copy
static VertexDeclaration vertexDecl;
vertexDecl.clear();
vertexDecl.addElement(GL_FLOAT, 3, VERTEX_USAGE_POSITION);
ro.vertexDecl = &vertexDecl;
......
Markdown is supported
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