Commit c642f9f9 authored by Martin Schultz's avatar Martin Schultz

fixed halfedge rendering for core profile renderers

parent 90de19aa
......@@ -871,21 +871,16 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
// buffers in system memory
drawMesh_->updateEdgeHalfedgeVertexDeclarations();
if (props->colored())
ro.vertexDecl = drawMesh_->getHalfedgeVertexDeclaration();
else
ro.vertexDecl = drawMesh_->getHalfedgeColoredVertexDeclaration();
halfedgeDecl.clear();
halfedgeDecl.addElement(GL_FLOAT, 3, VERTEX_USAGE_POSITION, (void *)0);
ro.vertexDecl = &halfedgeDecl;
// use specular color for lines
ro.emissive = ro.specular;
ro.vertexBuffer = drawMesh_->getHEVBO();
ro.indexBuffer = 0;
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";
_renderer->addRenderObject(&ro);
}
......
......@@ -352,7 +352,7 @@ 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