Ignore:
Timestamp:
Feb 25, 2009, 4:19:05 PM (15 years ago)
Author:
garnier
Message:

test pour GL_POINTS au lieu de glBitmap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc

    r929 r931  
    3333
    3434#ifdef G4VIS_BUILD_OPENGL_DRIVER
     35
     36#define G4DEBUG_VIS_OGL
    3537
    3638#include "G4ios.hh"
     
    143145
    144146void G4OpenGLViewer::ClearView () {
     147#ifdef G4DEBUG_VIS_OGL
     148  printf("G4OpenGLViewer::ClearView VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV \n");
     149#endif
    145150  glClearColor (background.GetRed(),
    146151                background.GetGreen(),
     
    154159  glClear (GL_STENCIL_BUFFER_BIT);
    155160  glFlush ();
     161#ifdef G4DEBUG_VIS_OGL
     162  printf("G4OpenGLViewer::ClearView ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
     163#endif
    156164}
    157165
     
    169177
    170178void G4OpenGLViewer::SetView () {
     179
     180#ifdef G4DEBUG_VIS_OGL
     181  printf("G4OpenGLViewer::SetView VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV \n");
     182#endif
    171183
    172184  if (!fSceneHandler.GetScene()) {
     
    308320  background = fVP.GetBackgroundColour ();
    309321
     322#ifdef G4DEBUG_VIS_OGL
     323  printf("G4OpenGLViewer::SetView ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \n");
     324#endif
    310325}
    311326
    312327void G4OpenGLViewer::HaloingFirstPass () {
    313328 
     329#ifdef G4DEBUG_VIS_OGL
     330  printf("G4OpenGLViewer::HaloingFirstPass VVVVVVVVVVVVVVVVVV \n");
     331#endif
    314332  //To perform haloing, first Draw all information to the depth buffer
    315333  //alone, using a chunky line width, and then Draw all info again, to
     
    334352void G4OpenGLViewer::HaloingSecondPass () {
    335353
     354#ifdef G4DEBUG_VIS_OGL
     355  printf("G4OpenGLViewer::HaloingSecondtPass VVVVVVVVVVVVVVVVVV \n");
     356#endif
    336357  //And finally, turn the colour buffer back on with a sesible line width...
    337358  glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
     
    888909
    889910  // FIXME : TEST
    890   G4VMarker defaultMarker = GetViewParameters().GetDefaultMarker();
    891   defaultMarker.SetWorldSize(defaultMarker.GetScreenSize());
    892   defaultMarker.SetWorldDiameter(defaultMarker.GetScreenDiameter());
    893   defaultMarker.SetWorldRadius(defaultMarker.GetScreenRadius());
     911  printf("G4OpenGLViewer::WritePostScript world size:%f\n",GetViewParameters().GetDefaultMarker().GetWorldSize());
     912  G4ViewParameters vp = GetViewParameters(); 
     913  G4VMarker defaultMarker = vp.GetDefaultMarker();
     914  G4VMarker myMarker = vp.GetDefaultMarker();
     915
     916  myMarker.SetScreenSize(0); // before SetWorldSize
     917  myMarker.SetScreenDiameter(0); // before SetWorldSize
     918  myMarker.SetScreenRadius(0); // before SetWorldSize
     919
     920  myMarker.SetWorldSize(6.);
     921  myMarker.SetWorldDiameter(4.);
     922  myMarker.SetWorldRadius(3.);
     923//   myMarker.SetWorldSize(defaultMarker.GetScreenSize());
     924//   myMarker.SetWorldDiameter(defaultMarker.GetScreenDiameter());
     925//   myMarker.SetWorldRadius(defaultMarker.GetScreenRadius());
     926
     927  vp.SetDefaultMarker(myMarker);
     928  SetViewParameters(vp);
    894929
    895930  fGL2PSAction->setFileName("PostScriptViaGL2PS.ps");
    896931  if (fGL2PSAction->enableFileWriting()) {
    897     ShowView();
     932    NeedKernelVisit ();
    898933    ProcessView();
    899     DrawView();
     934    SetView ();
     935    ClearView ();
     936    DrawView ();
    900937    fGL2PSAction->disableFileWriting();
    901938  }
    902 //   defaultMarker.SetScreenSize(defaultMarker.GetWorldSize());
    903 //   defaultMarker.SetScreenDiameter(defaultMarker.GetWorldDiameter());
    904 //   defaultMarker.SetScreenRadius(defaultMarker.GetWorldRadius());
     939  vp.SetDefaultMarker(defaultMarker);
     940  SetViewParameters(vp);
    905941  // FIXME : TEST
    906942
Note: See TracChangeset for help on using the changeset viewer.