Changeset 935 for trunk/source/visualization/OpenGL
- Timestamp:
- Mar 3, 2009, 3:56:13 PM (16 years ago)
- Location:
- trunk/source/visualization/OpenGL
- Files:
-
- 3 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/OpenGL/History
r924 r935 1 $Id: History,v 1.12 6 2009/02/16 15:31:05lgarnier Exp $1 $Id: History,v 1.127 2009/03/03 14:51:29 lgarnier Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 20 20 History file for visualization/OpenGL 21 21 ------------------------------------- 22 23 1st March 2009, Laurent Garnier 24 - Remplacing glBitmap by GL_POINTS to draw marker : Speed improvment 25 and gl2ps can now draw Markers. 22 26 23 27 16 February 2009, Laurent Garnier -
trunk/source/visualization/OpenGL/include/G4OpenGLStoredSceneHandler.hh
r915 r935 41 41 #include <map> 42 42 #include <vector> 43 #include "G4Polymarker.hh" 43 44 44 45 class G4OpenGLStored; … … 104 105 // A proper implementation would use geometry hierarchy. 105 106 std::map <const G4VSolid*, G4int, std::less <const G4VSolid*> > fSolidMap; 107 108 private: 109 G4Polymarker fLastPolymarker ; 106 110 }; 107 111 -
trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc
r934 r935 25 25 // 26 26 // 27 // $Id: G4OpenGLSceneHandler.cc,v 1.5 4 2008/04/04 13:32:22 allisonExp $27 // $Id: G4OpenGLSceneHandler.cc,v 1.55 2009/03/03 14:51:29 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 228 228 G4Circle circle (polymarker); 229 229 circle.SetPosition (polymarker[iPoint]); 230 printf(" G4OpenGLSceneHandler::AddPrimitive const G4Polymarker& polymarker iPoint:%d/%d center:%f,%f,%f\n",iPoint,polymarker.size (),polymarker[iPoint].x(),polymarker[iPoint].y(),polymarker[iPoint].z());231 230 G4OpenGLSceneHandler::AddPrimitive (circle); 232 231 } … … 287 286 glDisable (GL_LIGHTING); 288 287 289 printf("Creation d'un texte =====================\n");290 288 glRasterPos3d(position.x(),position.y(),position.z()); 291 292 //293 // const char *pC;294 // for (pC=textCString; *pC != '\0'; pC++) {295 // glutStrokeCharacter(GLUT_STROKE_ROMAN, *pC);296 // }297 //298 289 // No action on offset or layout at present. 299 290 glPushAttrib(GL_LIST_BIT); … … 377 368 // Draw... 378 369 if (sizeType == world) { // Size specified in world coordinates. 370 379 371 DrawXYPolygon (shape, size, centre, pVA); 380 372 381 373 } else { // Size specified in screen (window) coordinates. 382 // printf("Cree un marqueur------------------------------------%f %f %f \n",centre.x(),centre.y(),centre.z());383 #define G4_POINT=1384 #ifdef G4_POINT385 374 glPointSize (size); 386 375 glBegin (GL_POINTS); … … 392 381 glEnable(GL_BLEND); 393 382 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 394 #else 395 glRasterPos3d(centre.x(),centre.y(),centre.z()); 396 const GLubyte* marker = 397 G4OpenGLBitMapStore::GetBitMap(shape, size, filled); 398 glPixelStorei(GL_UNPACK_ALIGNMENT, 1); 399 glBitmap(GLsizei(size), GLsizei(size), size/2., size/2., 0., 0., marker); 400 #endif 383 384 // L. GARNIER 1 March 2009 385 // Old method, we draw a bitmap instead of a GL_POINT. 386 // I remove it because it cost in term of computing performances 387 // and gl2ps can't draw bitmaps 388 389 // glRasterPos3d(centre.x(),centre.y(),centre.z()); 390 // const GLubyte* marker = 391 // G4OpenGLBitMapStore::GetBitMap(shape, size, filled); 392 // glPixelStorei(GL_UNPACK_ALIGNMENT, 1); 393 // glBitmap(GLsizei(size), GLsizei(size), size/2., size/2., 0., 0., marker); 401 394 } 402 395 }
Note: See TracChangeset
for help on using the changeset viewer.