Ignore:
Timestamp:
Nov 9, 2009, 6:57:11 PM (15 years ago)
Author:
garnier
Message:

mise en place de Vis dans UI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc

    r1140 r1160  
    4444// Also seems to be required for HP's CC and AIX xlC, at least.
    4545
    46 
    47 #include "G4OpenGLQtViewer.hh"
    4846#include "G4OpenGLSceneHandler.hh"
    4947#include "G4OpenGLViewer.hh"
     
    265263  G4int font_base = G4OpenGLFontBaseStore::GetFontBase(fpViewer,size);
    266264  if (font_base < 0) {
    267    
    268 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER
    269     G4OpenGLQtViewer* oGLSQtViewer = dynamic_cast<G4OpenGLQtViewer*>(fpViewer);
    270     if (oGLSQtViewer) {
    271       // FIXME : No font for the moment
    272       const char* textCString = textString.c_str();
    273       oGLSQtViewer->drawText(textCString,position.x(),position.y(),position.z(),size);
    274     }
    275 #endif
    276265    static G4int callCount = 0;
    277266    ++callCount;
     
    294283  const char* textCString = textString.c_str();
    295284  glColor3d (c.GetRed (), c.GetGreen (), c.GetBlue ());
    296 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER
    297   G4OpenGLQtViewer* oGLSQtViewer = dynamic_cast<G4OpenGLQtViewer*>(fpViewer);
    298 
    299   if (oGLSQtViewer) {
    300     // FIXME : No font for the moment
    301     oGLSQtViewer->drawText(textCString,position.x(),position.y(),position.z(),size);
    302   }
    303 #else
    304     glDisable (GL_DEPTH_TEST);
    305     glDisable (GL_LIGHTING);
    306    
    307     glRasterPos3d(position.x(),position.y(),position.z());
    308     // No action on offset or layout at present.
    309     glPushAttrib(GL_LIST_BIT);
    310     glListBase(font_base);
    311     glCallLists(strlen(textCString), GL_UNSIGNED_BYTE, (GLubyte *)textCString);
    312     glPopAttrib();
    313 #endif
    314   //     //////////////
    315   //     makeCurrent();
    316   //     glPushAttrib(GL_LIST_BIT | GL_CURRENT_BIT | GL_COLOR_BUFFER_BIT);
    317   //     glRasterPos3d(x, y, z);
    318   //     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    319   //     glEnable(GL_BLEND);
    320   //     glListBase(fontDisplayListBase(fnt, listBase));
    321   //     glCallLists(str.length(), GL_UNSIGNED_BYTE, str.local8Bit());
    322   //     glPopAttrib();
    323   //     //////////////
     285  glDisable (GL_DEPTH_TEST);
     286  glDisable (GL_LIGHTING);
    324287 
    325 #ifdef G4DEBUG_VIS_OGL
    326   printf ("G4OpenGLSceneHandler::AddPrimitives TEXT\n");
    327 #endif 
     288  glRasterPos3d(position.x(),position.y(),position.z());
     289  // No action on offset or layout at present.
     290   glPushAttrib(GL_LIST_BIT);
     291   glListBase(font_base);
     292   glCallLists(strlen(textCString), GL_UNSIGNED_BYTE, (GLubyte *)textCString);
     293   glPopAttrib();
    328294}
    329295
Note: See TracChangeset for help on using the changeset viewer.