diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index af97d833d83..c28e49bcdf2 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -218,8 +218,8 @@ void CGAL::QGLViewer::initializeGL() { { format.setDepthBufferSize(24); format.setStencilBufferSize(8); - format.setVersion(2,1); - format.setRenderableType(QSurfaceFormat::OpenGL); + format.setVersion(2,0); + format.setRenderableType(QSurfaceFormat::OpenGLES); format.setSamples(0); format.setOption(QSurfaceFormat::DebugContext); QSurfaceFormat::setDefaultFormat(format); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Alpha_shape_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Alpha_shape_plugin.cpp index d808137b1d1..f999d9bd0a3 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Alpha_shape_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Alpha_shape_plugin.cpp @@ -348,8 +348,6 @@ void Scene_alpha_shape_item::draw(CGAL::Three::Viewer_interface* viewer) const // Specular QVector4D specular(0.0f, 0.0f, 0.0f, 1.0f); int is_both_sides; - viewer->glGetIntegerv(GL_LIGHT_MODEL_TWO_SIDE, - &is_both_sides); program = &facet_program; program->bind(); program->setUniformValue("mvp_matrix", mvp_mat); @@ -359,7 +357,7 @@ void Scene_alpha_shape_item::draw(CGAL::Three::Viewer_interface* viewer) const program->setUniformValue("light_spec", specular); program->setUniformValue("light_amb", ambient); program->setUniformValue("spec_power", 51.8f); - program->setUniformValue("is_two_side", is_both_sides); + program->setUniformValue("is_two_side", viewer->property("draw_two_sides").toBool()); program->setUniformValue("is_selected", false); vaos[0]->bind(); diff --git a/Polyhedron/demo/Polyhedron/Viewer.cpp b/Polyhedron/demo/Polyhedron/Viewer.cpp index 50f0a73411a..a1693ebc480 100644 --- a/Polyhedron/demo/Polyhedron/Viewer.cpp +++ b/Polyhedron/demo/Polyhedron/Viewer.cpp @@ -608,10 +608,6 @@ void Viewer::attribBuffers(int program_name) const { for (int i=0; i<16; ++i) mvp_mat.data()[i] = GLfloat(d_mat[i]); - - const_cast(this)->glGetIntegerv(GL_LIGHT_MODEL_TWO_SIDE, - &is_both_sides); - QVector4D position(0.0f,0.0f,1.0f, 1.0f ); QVector4D ambient(0.4f, 0.4f, 0.4f, 0.4f); // Diffuse @@ -657,7 +653,7 @@ void Viewer::attribBuffers(int program_name) const { program->setUniformValue("light_spec", specular); program->setUniformValue("light_amb", ambient); program->setUniformValue("spec_power", 51.8f); - program->setUniformValue("is_two_side", is_both_sides); + program->setUniformValue("is_two_side", d->twosides); break; } switch(program_name)