Index: /trunk/source/visualization/GNUmakefile
===================================================================
--- /trunk/source/visualization/GNUmakefile	(revision 923)
+++ /trunk/source/visualization/GNUmakefile	(revision 924)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.21 2005/06/04 14:53:18 gcosmo Exp $
+# $Id: GNUmakefile,v 1.22 2009/02/16 15:31:05 lgarnier Exp $
 # -----------------------------------------------------------------------
 # GNUmakefile for visualization and modeling.  John Allison, 5/7/95.
Index: /trunk/source/visualization/History
===================================================================
--- /trunk/source/visualization/History	(revision 923)
+++ /trunk/source/visualization/History	(revision 924)
@@ -1,3 +1,3 @@
-$Id: History,v 1.425 2009/01/22 15:39:54 lgarnier Exp $
+$Id: History,v 1.426 2009/02/16 15:31:05 lgarnier Exp $
 -------------------------------------------------------------------
 
@@ -24,4 +24,9 @@
 History file for visualization category
 ---------------------------------------
+
+16 February 2009, Laurent Garnier
+ - Creation of this gl2ps library in order to have a gl2ps for all viewers.
+ - Some modifications in GNUMakefile for gl2ps. Packages OpenInventor,
+   OpenGL had also been modified for gl2ps.
 
 22th January 2009  Laurent Garnier
Index: /trunk/source/visualization/OpenGL/GNUmakefile
===================================================================
--- /trunk/source/visualization/OpenGL/GNUmakefile	(revision 923)
+++ /trunk/source/visualization/OpenGL/GNUmakefile	(revision 924)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.8 2008/04/29 16:58:04 lgarnier Exp $
+# $Id: GNUmakefile,v 1.9 2009/02/16 15:31:05 lgarnier Exp $
 
 name := G4OpenGL
@@ -21,12 +21,5 @@
 include $(G4INSTALL)/config/interactivity.gmk
 
-CPPFLAGS += -DG4DEBUG_VIS_OGL
-
-ifdef G4VIS_BUILD_OPENGL_DRIVER
 CPPFLAGS += -I$(G4BASE)/visualization/externals/gl2ps/include
-endif
-ifdef G4VIS_BUILD_OI_DRIVER
-CPPFLAGS += -I$(G4BASE)/visualization/externals/gl2ps/include
-endif
 CPPFLAGS += -I$(G4BASE)/visualization/management/include
 CPPFLAGS += -I$(G4BASE)/visualization/modeling/include
Index: /trunk/source/visualization/OpenGL/History
===================================================================
--- /trunk/source/visualization/OpenGL/History	(revision 923)
+++ /trunk/source/visualization/OpenGL/History	(revision 924)
@@ -1,3 +1,3 @@
-$Id: History,v 1.125 2009/02/04 16:48:40 lgarnier Exp $
+$Id: History,v 1.126 2009/02/16 15:31:05 lgarnier Exp $
 -------------------------------------------------------------------
 
@@ -20,4 +20,10 @@
 History file for visualization/OpenGL
 -------------------------------------
+
+16 February 2009, Laurent Garnier
+ - Modifications in GNUMakefile for gl2ps.
+ - G4OpenGLViewer,G4OpenGLViewerMessenger.cc,G4OpenGLXmMainMenubarCallbacks.cc
+   ,G4OpenGLXmViewer.cc modified for gl2ps and some renaming "print" in 
+   "printVectoredEPS"
 
 2nd February 2009  Laurent Garnier
Index: /trunk/source/visualization/OpenGL/include/G4OpenGLViewer.hh
===================================================================
--- /trunk/source/visualization/OpenGL/include/G4OpenGLViewer.hh	(revision 923)
+++ /trunk/source/visualization/OpenGL/include/G4OpenGLViewer.hh	(revision 924)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLViewer.hh,v 1.26 2009/02/04 16:48:41 lgarnier Exp $
+// $Id: G4OpenGLViewer.hh,v 1.27 2009/02/16 15:31:05 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc	(revision 923)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc	(revision 924)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLViewer.cc,v 1.47 2009/02/04 16:48:41 lgarnier Exp $
+// $Id: G4OpenGLViewer.cc,v 1.48 2009/02/16 15:31:05 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
@@ -812,6 +812,4 @@
   int components, pos, i;
 
-  WritePostScript("1-PostScripTest.ps");
-
   pixels = grabPixels (inColour, width, height);
 
@@ -884,22 +882,12 @@
 void G4OpenGLViewer::WritePostScript(const char *aFile) {
 
-  G4cout << "Produce " << aFile << "..." << G4endl;
-
-  //  fGL2PSAction->enableFileWriting();
-
-
-  //////////////
   if (!fGL2PSAction) return;
 
   fGL2PSAction->setFileName("PostScriptViaGL2PS.ps");
-  G4cout << "Produce " << aFile << "..." << G4endl;
   if (fGL2PSAction->enableFileWriting()) {
     DrawView();
     fGL2PSAction->disableFileWriting();
   }
-  //////////////
-
-  //  FILE *fFile = fopen(aFile,"w");
-  FILE *fFile = fopen("PostScriptALaMain.ps","w");
+  FILE *fFile = fopen(aFile,"w");
   if(!fFile) {
     G4cout << "G4OpenGLViewer::WritePostScript. Cannot open file " <<aFile << G4endl;
@@ -948,7 +936,4 @@
                    15, 20, 10, buffsize, fFile, aFile);
     DrawView();
-#ifdef G4DEBUG_VIS_OGL
-    printf("into While............\n");
-#endif
     res = gl2psEndPage();
   }
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLViewerMessenger.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLViewerMessenger.cc	(revision 923)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLViewerMessenger.cc	(revision 924)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLViewerMessenger.cc,v 1.13 2009/01/19 16:53:42 lgarnier Exp $
+// $Id: G4OpenGLViewerMessenger.cc,v 1.14 2009/02/16 15:31:05 lgarnier Exp $
 // GEANT4 tag $Name:  $
 
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLXViewer.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLXViewer.cc	(revision 923)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLXViewer.cc	(revision 924)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLXViewer.cc,v 1.48 2009/02/04 16:48:41 lgarnier Exp $
+// $Id: G4OpenGLXViewer.cc,v 1.49 2009/02/16 15:31:05 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
Index: /trunk/source/visualization/OpenGL/src/G4OpenGLXmMainMenubarCallbacks.cc
===================================================================
--- /trunk/source/visualization/OpenGL/src/G4OpenGLXmMainMenubarCallbacks.cc	(revision 923)
+++ /trunk/source/visualization/OpenGL/src/G4OpenGLXmMainMenubarCallbacks.cc	(revision 924)
@@ -25,5 +25,5 @@
 //
 //
-// $Id: G4OpenGLXmMainMenubarCallbacks.cc,v 1.15 2009/02/04 16:48:41 lgarnier Exp $
+// $Id: G4OpenGLXmMainMenubarCallbacks.cc,v 1.16 2009/02/16 15:31:05 lgarnier Exp $
 // GEANT4 tag $Name:  $
 //
Index: /trunk/source/visualization/OpenInventor/GNUmakefile
===================================================================
--- /trunk/source/visualization/OpenInventor/GNUmakefile	(revision 923)
+++ /trunk/source/visualization/OpenInventor/GNUmakefile	(revision 924)
@@ -1,3 +1,3 @@
-# $Id: GNUmakefile,v 1.8 2006/11/02 12:02:23 allison Exp $
+# $Id: GNUmakefile,v 1.9 2009/02/16 15:31:05 lgarnier Exp $
 
 name := G4OpenInventor
@@ -18,11 +18,5 @@
 include $(G4INSTALL)/config/interactivity.gmk
 
-ifdef G4VIS_BUILD_OPENGL_DRIVER
 CPPFLAGS += -I$(G4BASE)/visualization/externals/gl2ps/include
-endif
-ifdef G4VIS_BUILD_OI_DRIVER
-CPPFLAGS += -I$(G4BASE)/visualization/externals/gl2ps/include
-endif
-
 CPPFLAGS += -I$(G4BASE)/visualization/management/include
 CPPFLAGS += -I$(G4BASE)/visualization/modeling/include
Index: /trunk/source/visualization/OpenInventor/History
===================================================================
--- /trunk/source/visualization/OpenInventor/History	(revision 923)
+++ /trunk/source/visualization/OpenInventor/History	(revision 924)
@@ -1,3 +1,3 @@
-$Id: History,v 1.96 2008/04/30 10:05:31 allison Exp $
+$Id: History,v 1.97 2009/02/16 15:31:05 lgarnier Exp $
 -------------------------------------------------------------------
 
@@ -20,4 +20,9 @@
 History file for visualization/OpenInventor
 -------------------------------------------
+
+16 February 2009, Laurent Garnier
+ - Modifications in GNUMakefile for gl2ps.
+ - SoGL2PSAction Modified.
+ - G4OpenInventorViewer.cc add a protection on file writing in gl2ps
 
 30th April 2008  John Allison  (openinventor-V09-01-01)
Index: /trunk/source/visualization/OpenInventor/src/G4OpenInventorViewer.cc
===================================================================
--- /trunk/source/visualization/OpenInventor/src/G4OpenInventorViewer.cc	(revision 923)
+++ /trunk/source/visualization/OpenInventor/src/G4OpenInventorViewer.cc	(revision 924)
@@ -24,6 +24,6 @@
 // ********************************************************************
 //
-// $Id: G4OpenInventorViewer.cc,v 1.59 2007/04/03 13:35:48 allison Exp $
-// GEANT4 tag $Name: HEAD $
+// $Id: G4OpenInventorViewer.cc,v 1.60 2009/02/16 15:31:05 lgarnier Exp $
+// GEANT4 tag $Name:  $
 
 #ifdef G4VIS_BUILD_OI_DRIVER
@@ -50,5 +50,6 @@
 #include "G4Scene.hh"
 #include "Geant4_SoPolyhedron.h"
-#include "G4AttValue.hh"#include "G4AttDef.hh"
+#include "G4AttValue.hh"
+#include "G4AttDef.hh"
 #include "G4AttCheck.hh"
 #include "G4AttHolder.hh"
Index: /trunk/source/visualization/OpenInventor/src/SoGL2PSAction.cc
===================================================================
--- /trunk/source/visualization/OpenInventor/src/SoGL2PSAction.cc	(revision 923)
+++ /trunk/source/visualization/OpenInventor/src/SoGL2PSAction.cc	(revision 924)
@@ -33,5 +33,4 @@
 /*--------------------------------------------------------------------------*/
 
-
 // this :
 #include <HEPVis/actions/SoGL2PSAction.h>
@@ -60,8 +59,9 @@
 :SoGLRenderAction(aViewPortRegion)
 ,G4OpenGL2PSAction()
+,fFileName("out.ps")
+,fFile(0)
 //////////////////////////////////////////////////////////////////////////////
 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
 {
-  setFileName("out.ps");
   SO_ACTION_CONSTRUCTOR(SoGL2PSAction);
 }
@@ -72,6 +72,5 @@
 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
 {
-  // FIXME Useful ??
-
+  // Useful ?? L.Garnier 02/2009
 #ifdef __COIN__
 #else //SGI
Index: /trunk/source/visualization/externals/gl2ps/History
===================================================================
--- /trunk/source/visualization/externals/gl2ps/History	(revision 923)
+++ /trunk/source/visualization/externals/gl2ps/History	(revision 924)
@@ -0,0 +1,25 @@
+$Id: History,v 1.106 2009/02/16 16:05:06 garnier Exp $
+-------------------------------------------------------------------
+
+     =========================================================
+     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
+     =========================================================
+
+                      Category History file
+                      ---------------------
+This file should be used by G4 developers and category coordinators
+to briefly summarize all major modifications introduced in the code
+and keep track of all category-tags.
+It DOES NOT substitute the  CVS log-message one should put at every
+committal in the CVS repository !
+
+     ----------------------------------------------------------
+     * Reverse chronological order (last date on top), please *
+     ----------------------------------------------------------
+
+16 February 2009, Laurent Garnier
+ - Creation of this library in order to have a gl2ps for all viewers.
+ - Copying gl2ps.cc and gl2ps.h files form OpenInventor/src
+ - Add a new file G4OpenGL2PSAction.cc to be on the top of gl2ps 
+   external package. This file will be heritate/used by viewers
+   in order to have gl2ps render.
