Changeset 542
- Timestamp:
- Jul 10, 2007, 6:15:17 PM (18 years ago)
- Location:
- trunk/geant4/visualization
- Files:
-
- 3 edited
-
OpenGL/src/G4OpenGLImmediateQtViewer.cc (modified) (6 diffs)
-
OpenGL/src/G4OpenGLQtViewer.cc (modified) (6 diffs)
-
management/src/G4VSceneHandler.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc
r541 r542 77 77 void G4OpenGLImmediateQtViewer::DrawView () { 78 78 79 printf("G4OpenGLImmediateQtViewer::DrawView %d %d \n",WinSize_x, WinSize_y);79 printf("G4OpenGLImmediateQtViewer::DrawView %d %d VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\n",WinSize_x, WinSize_y); 80 80 // If a double buffer context has been forced upon us, ignore the 81 81 // back buffer for this OpenGLImmediate view. … … 88 88 //glXMakeCurrent (dpy, win, cx); 89 89 glViewport (0, 0, WinSize_x, WinSize_y); 90 printf("******************* 1\n");91 90 92 91 if(style!=G4ViewParameters::hlr && 93 92 haloing_enabled) { 94 printf("******************* 3\n");95 93 96 94 HaloingFirstPass (); 97 printf("******************* 4\n");98 95 NeedKernelVisit (); 99 printf("******************* 5\n");100 96 ProcessView (); 101 printf("******************* 6\n");102 97 glFlush (); 103 printf("******************* 7\n");104 98 105 99 HaloingSecondPass (); 106 printf("******************* 8\n");107 100 108 101 } 109 102 110 103 NeedKernelVisit (); // Always need to visit G4 kernel. 111 printf("******************* 9\n");112 104 ProcessView (); 113 printf("******************* 10\n");114 105 FinishView (); 115 printf("G4OpenGLImmediateQtViewer::DrawView %d %d terminé\n",WinSize_x, WinSize_y);106 printf("G4OpenGLImmediateQtViewer::DrawView %d %d ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n",WinSize_x, WinSize_y); 116 107 117 108 } … … 124 115 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// 125 116 { 126 printf("G4OpenGLImmediateQtViewer::FinishView \n");117 printf("G4OpenGLImmediateQtViewer::FinishView VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\n"); 127 118 // if(!fHDC) return; 128 119 129 120 glFlush (); 121 printf("G4OpenGLImmediateQtViewer::FinishView ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n"); 130 122 131 123 // Empty the Windows message queue : … … 142 134 ,int height) 143 135 { 144 printf("G4OpenGLImmediateQtViewer::resizeGL \n");136 printf("G4OpenGLImmediateQtViewer::resizeGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV \n"); 145 137 int side = qMin(width, height); 146 138 glViewport((width - side) / 2, (height - side) / 2, side, side); … … 149 141 glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0); 150 142 glMatrixMode(GL_MODELVIEW); 151 printf("G4OpenGLImmediateQtViewer::resizeGL terminé\n");143 printf("G4OpenGLImmediateQtViewer::resizeGL ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n"); 152 144 } 153 145 154 146 void G4OpenGLImmediateQtViewer::paintGL() 155 147 { 156 printf("G4OpenGLImmediateQtViewer::paintGL \n");148 printf("G4OpenGLImmediateQtViewer::paintGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV \n"); 157 149 if (!readyToPaint) 158 150 return; … … 163 155 glViewport (0, 0, width(), height()); 164 156 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"); 168 167 // FIXME 169 168 // FinishView(); -
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r541 r542 60 60 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// 61 61 { 62 printf("G4OpenGLQtViewer::SetView \n");62 printf("G4OpenGLQtViewer::SetView ++++++++++++++++++++\n"); 63 63 // if(!fHDC) return; 64 64 // if(!fHGLRC) return; … … 66 66 fWindow->makeCurrent(); 67 67 G4OpenGLViewer::SetView (); 68 printf("G4OpenGLQtViewer::SetView --------------------\n"); 68 69 } 69 70 … … 79 80 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// 80 81 { 81 printf("G4OpenGLQtViewer::ShowView \n");82 printf("G4OpenGLQtViewer::ShowView +++++++++++++++++++++\n"); 82 83 // if(!fHDC) return; 83 84 glFlush (); 85 printf("G4OpenGLQtViewer::ShowView -----------------------\n"); 84 86 85 87 // // Empty the Windows message queue : … … 122 124 G4Qt* interactorManager = G4Qt::getInstance (); 123 125 // G4UImanager* UI = G4UImanager::GetUIpointer(); 124 printf("G4OpenGLQtViewer::CreateMainWindow 3\n");125 126 126 127 fWindow = new QGLWidget() ; 127 printf("G4OpenGLQtViewer::CreateMainWindow 4\n");128 128 fWindow->makeCurrent(); 129 printf("G4OpenGLQtViewer::CreateMainWindow 5\n");130 129 131 130 // create window 132 printf("G4OpenGLQtViewer::CreateMainWindow 6\n");133 131 if (qApp) { 134 132 GLWindow = new QDialog();//qApp->mainWidget()); … … 137 135 } 138 136 139 printf("G4OpenGLQtViewer::CreateMainWindow 7\n");140 printf("G4OpenGLQtViewer::CreateMainWindow 8\n");141 137 QHBoxLayout *mainLayout = new QHBoxLayout; 142 printf("G4OpenGLQtViewer::CreateMainWindow 9\n");143 138 mainLayout->addWidget(fWindow); 144 printf("G4OpenGLQtViewer::CreateMainWindow 10\n");145 139 GLWindow->setLayout(mainLayout); 146 printf("G4OpenGLQtViewer::CreateMainWindow 11\n");147 140 GLWindow->setWindowTitle("QGl Viewer"); 148 printf("G4OpenGLQtViewer::CreateMainWindow 12\n");149 141 GLWindow->resize(100, 300); 150 142 GLWindow->show(); … … 219 211 G4Qt* interactorManager = G4Qt::getInstance (); 220 212 // G4UImanager* UI = G4UImanager::GetUIpointer(); 221 printf("G4OpenGLQtViewer::CreateMainWindow 3\n");222 213 223 214 fWindow = glWidget ; -
trunk/geant4/visualization/management/src/G4VSceneHandler.cc
r541 r542 548 548 printf("G4VSceneHandler::ProcessScene 1\n"); 549 549 if (state == G4State_Idle) { 550 printf("G4VSceneHandler::ProcessScene 2 : idle\n"); 550 551 551 552 visManager->SetEventRefreshing(true); … … 553 554 if (fRequestedEvent) { 554 555 DrawEvent(fRequestedEvent); 556 printf("G4VSceneHandler::ProcessScene 3 : fRequestedEvent\n"); 555 557 556 558 } else { 559 printf("G4VSceneHandler::ProcessScene 3 : not fRequestedEvent\n"); 557 560 558 561 G4RunManager* runManager = G4RunManager::GetRunManager(); … … 565 568 if (fpScene->GetRefreshAtEndOfEvent()) { 566 569 567 if (verbosity >= G4VisManager::confirmations) { 568 G4cout << "Refreshing event..." << G4endl; 569 } 570 const G4Event* event = 0; 571 if (events && events->size()) event = events->back(); 572 if (event) DrawEvent(event); 573 574 } else { // Accumulating events. 575 printf("G4VSceneHandler::ProcessScene 7\n"); 576 577 if (verbosity >= G4VisManager::confirmations) { 578 G4cout << "Refreshing events in run..." << G4endl; 579 } 580 for (size_t i = 0; i < nKeptEvents; ++i) { 581 const G4Event* event = (*events)[i]; 582 if (event) DrawEvent(event); 583 } 584 585 if (!fpScene->GetRefreshAtEndOfRun()) { 586 if (verbosity >= G4VisManager::warnings) { 587 G4cout << 588 "WARNING: Cannot refresh events accumulated over more" 589 "\n than one runs. Refreshed just the last run..." 590 << G4endl; 591 } 592 } 570 printf("G4VSceneHandler::ProcessScene 4 : fpScene->GetRefreshAtEndOfEvent()\n"); 571 // if (verbosity >= G4VisManager::confirmations) { 572 // G4cout << "Refreshing event..." << G4endl; 573 // } 574 // const G4Event* event = 0; 575 // if (events && events->size()) event = events->back(); 576 // if (event) DrawEvent(event); 577 578 // } else { // Accumulating events. 579 // printf("G4VSceneHandler::ProcessScene 7\n"); 580 581 // if (verbosity >= G4VisManager::confirmations) { 582 // G4cout << "Refreshing events in run..." << G4endl; 583 // } 584 // for (size_t i = 0; i < nKeptEvents; ++i) { 585 // const G4Event* event = (*events)[i]; 586 // if (event) DrawEvent(event); 587 // } 588 589 // if (!fpScene->GetRefreshAtEndOfRun()) { 590 // if (verbosity >= G4VisManager::warnings) { 591 // G4cout << 592 // "WARNING: Cannot refresh events accumulated over more" 593 // "\n than one runs. Refreshed just the last run..." 594 // << G4endl; 595 // } 596 // } 593 597 } 594 598 }
Note:
See TracChangeset
for help on using the changeset viewer.
