Changeset 541 for trunk/geant4/visualization/OpenGL
- Timestamp:
- Jul 6, 2007, 3:03:56 PM (17 years ago)
- Location:
- trunk/geant4/visualization/OpenGL
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/OpenGL/include/G4OpenGLImmediateQtViewer.hh
r539 r541 57 57 void resizeGL(int width,int height); 58 58 void paintGL(); 59 private : 60 int readyToPaint; 59 61 }; 60 62 -
trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh
r540 r541 43 43 44 44 #include <QGLWidget> 45 #include <QDialog> 45 46 46 47 class G4OpenGLSceneHandler; … … 62 63 G4int WinSize_y; 63 64 QGLWidget* fWindow; 65 QDialog* GLWindow; 64 66 private: 65 67 // static LRESULT CALLBACK WindowProc(HWND,UINT,WPARAM,LPARAM); -
trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc
r540 r541 51 51 void G4OpenGLImmediateQtViewer::Initialise () { 52 52 53 readyToPaint = false; 54 53 55 // ensure a suitable window was found 54 56 55 57 printf("G4OpenGLImmediateQtViewer::Initialise () 1\n"); 56 58 CreateGLQtContext (); 59 57 60 CreateMainWindow (this); 58 61 CreateFontLists (); … … 68 71 glDepthFunc (GL_LEQUAL); 69 72 glDepthMask (GL_TRUE); 73 74 readyToPaint = true; 70 75 } 71 76 … … 83 88 //glXMakeCurrent (dpy, win, cx); 84 89 glViewport (0, 0, WinSize_x, WinSize_y); 90 printf("******************* 1\n"); 85 91 86 92 if(style!=G4ViewParameters::hlr && 87 93 haloing_enabled) { 94 printf("******************* 3\n"); 88 95 89 96 HaloingFirstPass (); 97 printf("******************* 4\n"); 90 98 NeedKernelVisit (); 99 printf("******************* 5\n"); 91 100 ProcessView (); 101 printf("******************* 6\n"); 92 102 glFlush (); 103 printf("******************* 7\n"); 93 104 94 105 HaloingSecondPass (); 106 printf("******************* 8\n"); 95 107 96 108 } 97 109 98 110 NeedKernelVisit (); // Always need to visit G4 kernel. 111 printf("******************* 9\n"); 99 112 ProcessView (); 113 printf("******************* 10\n"); 100 114 FinishView (); 115 printf("G4OpenGLImmediateQtViewer::DrawView %d %d terminé\n",WinSize_x, WinSize_y); 101 116 102 117 } … … 134 149 glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0); 135 150 glMatrixMode(GL_MODELVIEW); 151 printf("G4OpenGLImmediateQtViewer::resizeGL terminé \n"); 136 152 } 137 153 … … 139 155 { 140 156 printf("G4OpenGLImmediateQtViewer::paintGL \n"); 157 if (!readyToPaint) 158 return; 159 160 WinSize_x = (G4int) width(); 161 WinSize_y = (G4int) height(); 162 163 glViewport (0, 0, width(), height()); 164 165 ClearView (); 166 DrawView (); 167 141 168 // FIXME 142 169 // FinishView(); -
trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateSceneHandler.cc
r529 r541 151 151 152 152 void G4OpenGLImmediateSceneHandler::ClearTransientStore () { 153 154 153 G4VSceneHandler::ClearTransientStore (); 155 154 -
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r540 r541 82 82 // if(!fHDC) return; 83 83 glFlush (); 84 84 85 // // Empty the Windows message queue : 85 86 // MSG event; … … 123 124 printf("G4OpenGLQtViewer::CreateMainWindow 3\n"); 124 125 125 QPushButton hello("Hello world!");126 hello.resize(100, 30);127 hello.show();128 129 126 fWindow = new QGLWidget() ; 127 printf("G4OpenGLQtViewer::CreateMainWindow 4\n"); 130 128 fWindow->makeCurrent(); 129 printf("G4OpenGLQtViewer::CreateMainWindow 5\n"); 131 130 132 131 // create window 133 QDialog* GLWindow;132 printf("G4OpenGLQtViewer::CreateMainWindow 6\n"); 134 133 if (qApp) { 135 134 GLWindow = new QDialog();//qApp->mainWidget()); … … 138 137 } 139 138 139 printf("G4OpenGLQtViewer::CreateMainWindow 7\n"); 140 printf("G4OpenGLQtViewer::CreateMainWindow 8\n"); 140 141 QHBoxLayout *mainLayout = new QHBoxLayout; 142 printf("G4OpenGLQtViewer::CreateMainWindow 9\n"); 141 143 mainLayout->addWidget(fWindow); 144 printf("G4OpenGLQtViewer::CreateMainWindow 10\n"); 142 145 GLWindow->setLayout(mainLayout); 146 printf("G4OpenGLQtViewer::CreateMainWindow 11\n"); 143 147 GLWindow->setWindowTitle("QGl Viewer"); 144 GLWindow->resize(100, 30); 148 printf("G4OpenGLQtViewer::CreateMainWindow 12\n"); 149 GLWindow->resize(100, 300); 145 150 GLWindow->show(); 146 151 … … 220 225 221 226 // create window 222 QDialog* GLWindow ;223 227 if (qApp) { 224 228 GLWindow = new QDialog();//qApp->mainWidget());
Note: See TracChangeset
for help on using the changeset viewer.