From 29967a2f0e3938cae31b2ee09f331fe98d7310a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Cazals?= Date: Wed, 12 Apr 2006 12:36:15 +0000 Subject: [PATCH] --- Jet_fitting_3/demo/Jet_fitting_3/SketchSample.C | 2 ++ Jet_fitting_3/demo/Jet_fitting_3/enriched_polyhedron.h | 5 +++++ 2 files changed, 7 insertions(+) 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