Commit c642f9f9 authored by Martin Schultz's avatar Martin Schultz
Browse files

fixed halfedge rendering for core profile renderers

parent 90de19aa
...@@ -871,21 +871,16 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G ...@@ -871,21 +871,16 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
// buffers in system memory // buffers in system memory
drawMesh_->updateEdgeHalfedgeVertexDeclarations(); drawMesh_->updateEdgeHalfedgeVertexDeclarations();
if (props->colored()) halfedgeDecl.clear();
ro.vertexDecl = drawMesh_->getHalfedgeVertexDeclaration(); halfedgeDecl.addElement(GL_FLOAT, 3, VERTEX_USAGE_POSITION, (void *)0);
else
ro.vertexDecl = drawMesh_->getHalfedgeColoredVertexDeclaration();
ro.vertexDecl = &halfedgeDecl;
// use specular color for lines // use specular color for lines
ro.emissive = ro.specular; ro.emissive = ro.specular;
ro.vertexBuffer = drawMesh_->getHEVBO();
ro.indexBuffer = 0;
ro.glDrawArrays(GL_LINES, 0, int(mesh_.n_halfedges() * 2)); ro.glDrawArrays(GL_LINES, 0, int(mesh_.n_halfedges() * 2));
// use shaders to simulate line width
ro.setupLineRendering(_state.line_width(), Vec2f((float)_state.viewport_width(), (float)_state.viewport_height()));
applyRenderObjectSettings(props->primitive(), &ro);
ro.debugName = "MeshNode.HalfEdges"; ro.debugName = "MeshNode.HalfEdges";
_renderer->addRenderObject(&ro); _renderer->addRenderObject(&ro);
} }
......
...@@ -352,7 +352,7 @@ private: ...@@ -352,7 +352,7 @@ private:
private: private:
VertexDeclaration halfedgeDecl;
/** @} */ /** @} */
//=========================================================================== //===========================================================================
......
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