diff --git a/Jet_fitting_3/demo/Jet_fitting_3/SketchSample.C b/Jet_fitting_3/demo/Jet_fitting_3/SketchSample.C index e4a5c1330d5..18b8a22d71d 100644 --- a/Jet_fitting_3/demo/Jet_fitting_3/SketchSample.C +++ b/Jet_fitting_3/demo/Jet_fitting_3/SketchSample.C @@ -36,6 +36,7 @@ void SketchSample::buildDisplayList(GLuint surf) { for (DS_iterator it=p_ppal_data->begin();it!=p_ppal_data->end();it++) draw_point((*it)->P1); //next, ppal dirs and normal + glDisable(GL_LIGHTING); for (DS_iterator it=p_ppal_data->begin();it!=p_ppal_data->end();it++) { glColor3f(0.,0.,1.);//dmax @@ -47,6 +48,7 @@ void SketchSample::buildDisplayList(GLuint surf) { / CGAL::sqrt( ((*it)->D1) * ((*it)->D1) ); draw_vector((*it)->P1, normal) ; } + glEnable(GL_LIGHTING); // static GLfloat ared[4] = {0.8, 0.1, 0.0, 1.0 }; // // glNewList(surf, GL_COMPILE); diff --git a/Jet_fitting_3/demo/Jet_fitting_3/enriched_polyhedron.h b/Jet_fitting_3/demo/Jet_fitting_3/enriched_polyhedron.h index 3f99fae1c0a..fc96f77111f 100644 --- a/Jet_fitting_3/demo/Jet_fitting_3/enriched_polyhedron.h +++ b/Jet_fitting_3/demo/Jet_fitting_3/enriched_polyhedron.h @@ -287,6 +287,10 @@ public : // draw facets void gl_draw_facets(const bool smooth) { + glEnable(GL_LIGHTING); + static GLfloat tryellow[4] = {0.3, 0.3, 0.0, 1 }; + glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, tryellow); + Facet_iterator hFacet; for(hFacet = facets_begin(); hFacet != facets_end(); @@ -297,6 +301,7 @@ public : void gl_draw_facet(Facet_handle hFacet, const bool smooth) { + ::glBegin(GL_POLYGON); // one normal per facet