mirror of https://github.com/CGAL/cgal
Merge pull request #4587 from maxGimeno/Demo-Fix_coff-maxGimeno
Polyhedron Demo: Fix colored soups reading
This commit is contained in:
commit
b8be965d18
|
|
@ -41,9 +41,14 @@ void Triangle_container::initGL( Viewer_interface* viewer)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!getVao(viewer))
|
if(!getVao(viewer))
|
||||||
setVao(viewer, new Vao(viewer->getShaderProgram(getProgram())));
|
setVao(viewer, new Vao(viewer->getShaderProgram(getProgram())));
|
||||||
|
//in both because of the soup item
|
||||||
|
if(!getVbo(VColors))
|
||||||
|
setVbo(VColors,
|
||||||
|
new Vbo("colors",
|
||||||
|
Vbo::COLORS));
|
||||||
|
getVao(viewer)->addVbo(getVbo(VColors));
|
||||||
if(isDataIndexed())
|
if(isDataIndexed())
|
||||||
{
|
{
|
||||||
if(!getVbo(Smooth_vertices))
|
if(!getVbo(Smooth_vertices))
|
||||||
|
|
@ -65,11 +70,6 @@ void Triangle_container::initGL( Viewer_interface* viewer)
|
||||||
Vbo::NORMALS));
|
Vbo::NORMALS));
|
||||||
getVao(viewer)->addVbo(getVbo(Smooth_normals));
|
getVao(viewer)->addVbo(getVbo(Smooth_normals));
|
||||||
}
|
}
|
||||||
if(!getVbo(VColors))
|
|
||||||
setVbo(VColors,
|
|
||||||
new Vbo("colors",
|
|
||||||
Vbo::COLORS));
|
|
||||||
getVao(viewer)->addVbo(getVbo(VColors));
|
|
||||||
if(viewer->getShaderProgram(getProgram())->property("hasDistanceValues").toBool())
|
if(viewer->getShaderProgram(getProgram())->property("hasDistanceValues").toBool())
|
||||||
{
|
{
|
||||||
if(!getVbo(Distances))
|
if(!getVbo(Distances))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue