Changeset 908 for trunk/source
- Timestamp:
- Jan 16, 2009, 3:22:04 PM (15 years ago)
- Location:
- trunk/source/visualization/OpenGL
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/OpenGL/include/G4OpenGLViewer.hh
r906 r908 25 25 // 26 26 // 27 // $Id: G4OpenGLViewer.hh,v 1.2 4 2009/01/13 09:47:05lgarnier Exp $27 // $Id: G4OpenGLViewer.hh,v 1.25 2009/01/16 08:29:17 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // -
trunk/source/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc
r906 r908 25 25 // 26 26 // 27 // $Id: G4OpenGLImmediateQtViewer.cc,v 1. 8 2009/01/13 09:47:05lgarnier Exp $27 // $Id: G4OpenGLImmediateQtViewer.cc,v 1.9 2009/01/15 18:14:58 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 202 202 printf("G4OpenGLImmediateQtViewer::paintGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV ready %d\n",readyToPaint); 203 203 #endif 204 // fWinSize_x = (unsigned int) width();205 // fWinSize_y = (unsigned int) height();206 207 // setupViewport(width(),height());208 204 209 205 SetView(); -
trunk/source/visualization/OpenGL/src/G4OpenGLImmediateXmViewer.cc
r897 r908 25 25 // 26 26 // 27 // $Id: G4OpenGLImmediateXmViewer.cc,v 1.1 7 2006/07/03 16:38:13allison Exp $27 // $Id: G4OpenGLImmediateXmViewer.cc,v 1.18 2009/01/13 12:07:12 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // -
trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r906 r908 25 25 // 26 26 // 27 // $Id: G4OpenGLQtViewer.cc,v 1.3 1 2009/01/13 09:47:05lgarnier Exp $27 // $Id: G4OpenGLQtViewer.cc,v 1.32 2009/01/15 18:14:58 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 174 174 175 175 //useful for MACOSX, we have to compt the menuBar height 176 unsignedint offset = QApplication::desktop()->height()176 int offset = QApplication::desktop()->height() 177 177 - QApplication::desktop()->availableGeometry().height(); 178 178 -
trunk/source/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc
r906 r908 25 25 // 26 26 // 27 // $Id: G4OpenGLStoredQtViewer.cc,v 1.2 1 2009/01/13 09:47:05lgarnier Exp $27 // $Id: G4OpenGLStoredQtViewer.cc,v 1.22 2009/01/15 18:14:58 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 235 235 printf("G4OpenGLStoredQtViewer::paintGL VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV ready %d\n",readyToPaint); 236 236 #endif 237 // fWinSize_x = (unsigned int) width();238 // fWinSize_y = (unsigned int) height();239 240 // setupViewport(width(),height());241 237 242 238 SetView(); -
trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc
r906 r908 25 25 // 26 26 // 27 // $Id: G4OpenGLViewer.cc,v 1.4 3 2009/01/13 09:47:05lgarnier Exp $27 // $Id: G4OpenGLViewer.cc,v 1.45 2009/01/15 18:14:58 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 156 156 { 157 157 #ifdef G4DEBUG 158 printf("G4OpenGL QtViewer::setupViewport\n");158 printf("G4OpenGLViewer::setupViewport\n"); 159 159 #endif 160 160 … … 167 167 void G4OpenGLViewer::SetView () { 168 168 169 #ifdef G4DEBUG170 printf("G4OpenGLViewer::SetView ------------\n");171 #endif172 169 if (!fSceneHandler.GetScene()) { 173 G4cerr << "G4OpenGLStored QtViewer: Creating a Viewer without a scene is not allowed. \nPlease use /vis/scene/create before /vis/open/.... "170 G4cerr << "G4OpenGLStoredViewer: Creating a Viewer without a scene is not allowed. \nPlease use /vis/scene/create before /vis/open/.... " 174 171 << G4endl; 175 172 return; … … 210 207 211 208 // FIXME 212 // const G4int& width = fVP.GetWindowSizeHintX();213 // const G4int& height = fVP.GetWindowSizeHintY();214 // G4int side = width;215 // if (height < width) side = height;216 // glViewport((width - side) / 2, (height - side) / 2, side, side);217 209 ResizeGLView(); 210 //SHOULD SetWindowsSizeHint()... 218 211 219 212 glMatrixMode (GL_PROJECTION); // set up Frustum. … … 225 218 if (fVP.GetFieldHalfAngle() == 0.) { 226 219 glOrtho (left, right, bottom, top, pnear, pfar); 227 #ifdef G4DEBUG228 printf("G4OpenGLViewer::SetView ------------rescale\n");229 #endif230 220 } 231 221 else { 232 222 glFrustum (left, right, bottom, top, pnear, pfar); 233 #ifdef G4DEBUG 234 printf("G4OpenGLViewer::SetView ------------Frustum\n"); 235 #endif 236 } 237 223 } 238 224 239 225 glMatrixMode (GL_MODELVIEW); // apply further transformations to scene. -
trunk/source/visualization/OpenGL/src/G4OpenGLXViewer.cc
r906 r908 82 82 extern "C" { 83 83 static Bool G4OpenGLXViewerWaitForNotify (Display*, XEvent* e, char* arg) { 84 #ifdef G4DEBUG85 printf("G4OpenGLXViewerWaitForNotify\n");86 #endif87 84 return (e->type == MapNotify) && (e->xmap.window == (Window) arg); 88 85 } -
trunk/source/visualization/OpenGL/src/G4OpenGLXmViewer.cc
r906 r908 25 25 // 26 26 // 27 // $Id: G4OpenGLXmViewer.cc,v 1.2 5 2009/01/13 09:47:05lgarnier Exp $27 // $Id: G4OpenGLXmViewer.cc,v 1.26 2009/01/15 18:14:58 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 600 600 // This should be add AFTER glXMakeCurrent done because it will fire a resizeCallback 601 601 XtAddCallback (glxarea, 602 XmNresizeCallback,603 resize_callback,604 this);602 XmNresizeCallback, 603 resize_callback, 604 this); 605 605 606 606 XtAddCallback (glxarea,
Note: See TracChangeset
for help on using the changeset viewer.