Ignore:
Timestamp:
Jul 10, 2007, 6:15:17 PM (18 years ago)
Author:
garnier
Message:

r688@mac-90108: laurentgarnier | 2007-07-06 18:41:19 +0200
mise a jour de la visu OpenGl. Ne marche pas encore, en version lente

Location:
trunk/geant4/visualization/OpenGL/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc

    r541 r542  
    7777void G4OpenGLImmediateQtViewer::DrawView () {
    7878
    79   printf("G4OpenGLImmediateQtViewer::DrawView %d %d\n",WinSize_x, WinSize_y);
     79  printf("G4OpenGLImmediateQtViewer::DrawView %d %d   VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\n",WinSize_x, WinSize_y);
    8080  // If a double buffer context has been forced upon us, ignore the
    8181  // back buffer for this OpenGLImmediate view.
     
    8888  //glXMakeCurrent (dpy, win, cx);
    8989  glViewport (0, 0, WinSize_x, WinSize_y);
    90   printf("******************* 1\n");
    9190
    9291  if(style!=G4ViewParameters::hlr &&
    9392     haloing_enabled) {
    94   printf("******************* 3\n");
    9593
    9694    HaloingFirstPass ();
    97   printf("******************* 4\n");
    9895    NeedKernelVisit ();
    99   printf("******************* 5\n");
    10096    ProcessView ();
    101   printf("******************* 6\n");
    10297    glFlush ();
    103   printf("******************* 7\n");
    10498
    10599    HaloingSecondPass ();
    106   printf("******************* 8\n");
    107100
    108101  }
    109102
    110103  NeedKernelVisit ();  // Always need to visit G4 kernel.
    111   printf("******************* 9\n");
    112104  ProcessView ();
    113   printf("******************* 10\n");
    114105  FinishView ();
    115   printf("G4OpenGLImmediateQtViewer::DrawView %d %d   terminé\n",WinSize_x, WinSize_y);
     106  printf("G4OpenGLImmediateQtViewer::DrawView %d %d ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n",WinSize_x, WinSize_y);
    116107
    117108}
     
    124115//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
    125116{
    126   printf("G4OpenGLImmediateQtViewer::FinishView \n");
     117  printf("G4OpenGLImmediateQtViewer::FinishView VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\n");
    127118  //    if(!fHDC) return;
    128119
    129120  glFlush ();
     121  printf("G4OpenGLImmediateQtViewer::FinishView ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n");
    130122
    131123  // Empty the Windows message queue :
     
    142134,int height)
    143135{
    144   printf("G4OpenGLImmediateQtViewer::resizeGL \n");
     136  printf("G4OpenGLImmediateQtViewer::resizeGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV \n");
    145137  int side = qMin(width, height);
    146138  glViewport((width - side) / 2, (height - side) / 2, side, side);
     
    149141  glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0);
    150142  glMatrixMode(GL_MODELVIEW);
    151   printf("G4OpenGLImmediateQtViewer::resizeGL terminé \n");
     143  printf("G4OpenGLImmediateQtViewer::resizeGL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n");
    152144}
    153145
    154146void G4OpenGLImmediateQtViewer::paintGL()
    155147 {
    156   printf("G4OpenGLImmediateQtViewer::paintGL \n");
     148  printf("G4OpenGLImmediateQtViewer::paintGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV \n");
    157149  if (!readyToPaint)
    158150    return;
     
    163155  glViewport (0, 0, width(), height());
    164156
    165   ClearView ();
    166   DrawView ();
    167 
     157  SetView();
     158  ClearView (); //ok, put the background correct
     159  float b=3;
     160  for (int a=0;a<100000000;a++) {b = b/3.1456;}
     161  DrawView();
     162  for (int a=0;a<100000000;a++) {b = b/3.1456;}
     163  ShowView();
     164  for (int a=0;a<100000000;a++) {b = b/3.1456;}
     165  //  makeCurrent();
     166  printf("G4OpenGLImmediateQtViewer::paintGL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
    168167  // FIXME
    169168  //  FinishView();
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc

    r541 r542  
    6060//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
    6161{
    62   printf("G4OpenGLQtViewer::SetView \n");
     62  printf("G4OpenGLQtViewer::SetView ++++++++++++++++++++\n");
    6363//   if(!fHDC) return;
    6464//   if(!fHGLRC) return;
     
    6666  fWindow->makeCurrent();
    6767  G4OpenGLViewer::SetView (); 
     68  printf("G4OpenGLQtViewer::SetView --------------------\n");
    6869}
    6970
     
    7980//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
    8081{
    81   printf("G4OpenGLQtViewer::ShowView \n");
     82  printf("G4OpenGLQtViewer::ShowView  +++++++++++++++++++++\n");
    8283  //   if(!fHDC) return;
    8384  glFlush ();
     85  printf("G4OpenGLQtViewer::ShowView -----------------------\n");
    8486
    8587//   // Empty the Windows message queue :
     
    122124  G4Qt* interactorManager = G4Qt::getInstance ();
    123125  //  G4UImanager* UI = G4UImanager::GetUIpointer();
    124   printf("G4OpenGLQtViewer::CreateMainWindow 3\n");
    125126
    126127  fWindow = new QGLWidget() ;
    127   printf("G4OpenGLQtViewer::CreateMainWindow 4\n");
    128128  fWindow->makeCurrent();
    129   printf("G4OpenGLQtViewer::CreateMainWindow 5\n");
    130129
    131130  // create window
    132   printf("G4OpenGLQtViewer::CreateMainWindow 6\n");
    133131  if (qApp) {
    134132    GLWindow = new QDialog();//qApp->mainWidget());
     
    137135  }
    138136
    139   printf("G4OpenGLQtViewer::CreateMainWindow 7\n");
    140   printf("G4OpenGLQtViewer::CreateMainWindow 8\n");
    141137  QHBoxLayout *mainLayout = new QHBoxLayout;
    142   printf("G4OpenGLQtViewer::CreateMainWindow 9\n");
    143138  mainLayout->addWidget(fWindow);
    144   printf("G4OpenGLQtViewer::CreateMainWindow 10\n");
    145139  GLWindow->setLayout(mainLayout);
    146   printf("G4OpenGLQtViewer::CreateMainWindow 11\n");
    147140  GLWindow->setWindowTitle("QGl Viewer");
    148   printf("G4OpenGLQtViewer::CreateMainWindow 12\n");
    149141  GLWindow->resize(100, 300);
    150142  GLWindow->show();
     
    219211  G4Qt* interactorManager = G4Qt::getInstance ();
    220212  //  G4UImanager* UI = G4UImanager::GetUIpointer();
    221   printf("G4OpenGLQtViewer::CreateMainWindow 3\n");
    222213
    223214  fWindow = glWidget ;
Note: See TracChangeset for help on using the changeset viewer.