mirror of https://github.com/CGAL/cgal
Remove remaining calls to GL_LIGHT smth
This commit is contained in:
parent
bace15874b
commit
9a258d081f
|
|
@ -218,8 +218,8 @@ void CGAL::QGLViewer::initializeGL() {
|
||||||
{
|
{
|
||||||
format.setDepthBufferSize(24);
|
format.setDepthBufferSize(24);
|
||||||
format.setStencilBufferSize(8);
|
format.setStencilBufferSize(8);
|
||||||
format.setVersion(2,1);
|
format.setVersion(2,0);
|
||||||
format.setRenderableType(QSurfaceFormat::OpenGL);
|
format.setRenderableType(QSurfaceFormat::OpenGLES);
|
||||||
format.setSamples(0);
|
format.setSamples(0);
|
||||||
format.setOption(QSurfaceFormat::DebugContext);
|
format.setOption(QSurfaceFormat::DebugContext);
|
||||||
QSurfaceFormat::setDefaultFormat(format);
|
QSurfaceFormat::setDefaultFormat(format);
|
||||||
|
|
|
||||||
|
|
@ -348,8 +348,6 @@ void Scene_alpha_shape_item::draw(CGAL::Three::Viewer_interface* viewer) const
|
||||||
// Specular
|
// Specular
|
||||||
QVector4D specular(0.0f, 0.0f, 0.0f, 1.0f);
|
QVector4D specular(0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
int is_both_sides;
|
int is_both_sides;
|
||||||
viewer->glGetIntegerv(GL_LIGHT_MODEL_TWO_SIDE,
|
|
||||||
&is_both_sides);
|
|
||||||
program = &facet_program;
|
program = &facet_program;
|
||||||
program->bind();
|
program->bind();
|
||||||
program->setUniformValue("mvp_matrix", mvp_mat);
|
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_spec", specular);
|
||||||
program->setUniformValue("light_amb", ambient);
|
program->setUniformValue("light_amb", ambient);
|
||||||
program->setUniformValue("spec_power", 51.8f);
|
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);
|
program->setUniformValue("is_selected", false);
|
||||||
|
|
||||||
vaos[0]->bind();
|
vaos[0]->bind();
|
||||||
|
|
|
||||||
|
|
@ -608,10 +608,6 @@ void Viewer::attribBuffers(int program_name) const {
|
||||||
for (int i=0; i<16; ++i)
|
for (int i=0; i<16; ++i)
|
||||||
mvp_mat.data()[i] = GLfloat(d_mat[i]);
|
mvp_mat.data()[i] = GLfloat(d_mat[i]);
|
||||||
|
|
||||||
|
|
||||||
const_cast<Viewer*>(this)->glGetIntegerv(GL_LIGHT_MODEL_TWO_SIDE,
|
|
||||||
&is_both_sides);
|
|
||||||
|
|
||||||
QVector4D position(0.0f,0.0f,1.0f, 1.0f );
|
QVector4D position(0.0f,0.0f,1.0f, 1.0f );
|
||||||
QVector4D ambient(0.4f, 0.4f, 0.4f, 0.4f);
|
QVector4D ambient(0.4f, 0.4f, 0.4f, 0.4f);
|
||||||
// Diffuse
|
// Diffuse
|
||||||
|
|
@ -657,7 +653,7 @@ void Viewer::attribBuffers(int program_name) const {
|
||||||
program->setUniformValue("light_spec", specular);
|
program->setUniformValue("light_spec", specular);
|
||||||
program->setUniformValue("light_amb", ambient);
|
program->setUniformValue("light_amb", ambient);
|
||||||
program->setUniformValue("spec_power", 51.8f);
|
program->setUniformValue("spec_power", 51.8f);
|
||||||
program->setUniformValue("is_two_side", is_both_sides);
|
program->setUniformValue("is_two_side", d->twosides);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch(program_name)
|
switch(program_name)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue