Stupid mistake fixed.
Jean-baptiste Silvy [Mon, 18 Aug 2008 11:40:59 +0000 (11:40 +0000)]
scilab/modules/renderer/src/cpp/surfaceDrawing/SurfaceFacetDrawerJoGL.cpp
scilab/modules/renderer/src/cpp/surfaceDrawing/SurfaceLineDrawerJoGL.cpp
scilab/modules/renderer/src/cpp/surfaceDrawing/SurfaceMarkDrawerJoGL.cpp

index cb1ae8a..1541cff 100644 (file)
@@ -41,8 +41,6 @@ void SurfaceFacetDrawerJoGL::drawSurface( void )
   sciPointObj * pSurface = m_pDrawer->getDrawedObject();
   sciSurface * ppSurface = pSURFACE_FEATURE(pSurface);
 
-  initializeDrawing();
-
   int nbVertexPerFacet = 0;
   if (ppSurface->typeof3d == SCI_PLOT3D)
   {
@@ -88,6 +86,8 @@ void SurfaceFacetDrawerJoGL::drawSurface( void )
   m_pDrawed->pointScale(NULL, yCoords, NULL, sizeYCoord);
   m_pDrawed->pointScale(NULL, NULL, zCoords, sizeZCoord);
 
+  initializeDrawing();
+
   getFacetDrawerJavaMapper()->setSurfaceType(ppSurface->typeof3d, ppSurface->flagcolor);
   getFacetDrawerJavaMapper()->setDefaultColors(Abs(ppSurface->flag[0]), ppSurface->hiddencolor);
   if (ppSurface->color != NULL) {
index 04a2e3f..03b06b7 100644 (file)
@@ -41,8 +41,6 @@ void SurfaceLineDrawerJoGL::drawSurface( void )
   sciPointObj * pSurface = m_pDrawer->getDrawedObject();
   sciSurface * ppSurface = pSURFACE_FEATURE(pSurface);
 
-  initializeDrawing();
-
   int nbVertexPerFacet = 0;
   if (ppSurface->typeof3d == SCI_PLOT3D)
   {
index 84ee4fd..b9a537b 100644 (file)
@@ -41,8 +41,6 @@ void SurfaceMarkDrawerJoGL::drawSurface( void )
   sciPointObj * pSurface = m_pDrawer->getDrawedObject();
   sciSurface * ppSurface = pSURFACE_FEATURE(pSurface);
 
-  initializeDrawing();
-
   int nbVertexPerFacet = 0;
   if (ppSurface->typeof3d == SCI_PLOT3D)
   {
@@ -87,6 +85,8 @@ void SurfaceMarkDrawerJoGL::drawSurface( void )
   m_pDrawed->pointScale(NULL, yCoords, NULL, sizeYCoord);
   m_pDrawed->pointScale(NULL, NULL, zCoords, sizeZCoord);
 
+  initializeDrawing();
+
   getMarkDrawerJavaMapper()->setSurfaceType(ppSurface->typeof3d);
   getMarkDrawerJavaMapper()->setMarkParameters(sciGetGraphicContext(pSurface)->markbackground,
                                                sciGetGraphicContext(pSurface)->markforeground,