Changeset 928 for trunk


Ignore:
Timestamp:
Feb 17, 2009, 3:34:09 PM (15 years ago)
Author:
garnier
Message:

ok for OI

Location:
trunk/source/visualization/OpenInventor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/OpenInventor/include/HEPVis/actions/SoGL2PSAction.h

    r927 r928  
    4545  static void initClass();
    4646  bool enableFileWriting();
     47  void disableFileWriting();
    4748protected:
    4849  virtual void beginTraversal(SoNode*);
    49   void setViewport();
    5050};
    5151
  • trunk/source/visualization/OpenInventor/src/SoGL2PSAction.cc

    r927 r928  
    8989  const SbViewportRegion& vpr = getViewportRegion();
    9090  SoViewportRegionElement::set(getState(),vpr);
    91   gl2psBegin();
     91  G4gl2psBegin();
    9292#endif
    9393  return true;
    9494}
    95 
    9695//////////////////////////////////////////////////////////////////////////////
    97 void SoGL2PSAction::setViewport(
     96void SoGL2PSAction::disableFileWriting(
    9897)
    9998//////////////////////////////////////////////////////////////////////////////
    10099//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
    101100{
    102 #ifdef G4DEBUG_VIS_OGL
    103   printf("SoGL2PSAction::setViewport\n");
    104 #endif
    105   // Useful ? L.Garnier 02/2009
    106 
    107101#ifdef __COIN__
    108102#else //SGI
    109   const SbViewportRegion& vpr = getViewportRegion();
    110   SoViewportRegionElement::set(getState(),vpr);
    111  
    112   const SbVec2s& win = vpr.getWindowSize();
    113   fViewport[0] = 0;
    114   fViewport[1] = 0;
    115   fViewport[2] = win[0];
    116   fViewport[3] = win[1];
     103  gl2psEndPage();       
    117104#endif
     105  ::fclose(fFile);
     106  fFile = 0;
    118107}
     108
    119109//////////////////////////////////////////////////////////////////////////////
    120110void SoGL2PSAction::beginTraversal(
     
    124114//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
    125115{
    126 #ifdef G4DEBUG_VIS_OGL
    127   printf("SoGL2PSAction::beginTraversal\n");
    128 #endif
    129116  if(fFile) {
    130117#ifdef __COIN__
    131118    const SbViewportRegion& vpr = getViewportRegion();
    132119    SoViewportRegionElement::set(getState(),vpr);
    133 #ifdef G4DEBUG_VIS_OGL
    134   printf("SoGL2PSAction::beginTraversal 1\n");
    135 #endif
    136120    G4gl2psBegin();
    137 #ifdef G4DEBUG_VIS_OGL
    138   printf("SoGL2PSAction::beginTraversal 2\n");
    139 #endif
    140121    traverse(aNode);
    141 #ifdef G4DEBUG_VIS_OGL
    142   printf("SoGL2PSAction::beginTraversal 3\n");
    143 #endif
    144     gl2psEndPage();       
    145 #ifdef G4DEBUG_VIS_OGL
    146   printf("SoGL2PSAction::beginTraversal 4\n");
    147 #endif
     122    gl2psEndPage();       
    148123#else //SGI
     124    // Should have already do G4gl2psBegin() before
    149125    SoGLRenderAction::beginTraversal(aNode);
     126    // Should do gl2psEndPage() after
    150127#endif
    151128  } else {
    152129    SoGLRenderAction::beginTraversal(aNode);
    153130  }
    154 #ifdef G4DEBUG_VIS_OGL
    155   printf("SoGL2PSAction::beginTraversal 5\n");
    156 #endif
    157131}
    158132
Note: See TracChangeset for help on using the changeset viewer.