33 #if defined (G4VIS_BUILD_OPENGLX_DRIVER) || defined (G4VIS_USE_OPENGLX)
35 #ifndef G4OPENGLXVIEWER_HH
36 #define G4OPENGLXVIEWER_HH
41 #include <X11/Intrinsic.h>
46 class G4OpenGLSceneHandler;
49 class G4OpenGLXViewer:
virtual public G4OpenGLViewer {
51 friend class G4OpenGLXViewerMessenger;
52 friend class G4OpenGLXmViewer;
55 G4OpenGLXViewer (G4OpenGLSceneHandler& scene);
56 virtual ~G4OpenGLXViewer ();
59 #ifdef G4MULTITHREADED
60 void SwitchToVisSubThread();
61 void SwitchToMasterThread();
63 void DrawText(
const G4Text&);
66 void GetXConnection ();
67 void CreateGLXContext (XVisualInfo* vi);
68 virtual void CreateMainWindow ();
69 virtual void CreateFontLists ();
71 static int snglBuf_RGBA[12];
72 static int dblBuf_RGBA[13];
76 XWindowAttributes xwa;
78 static XVisualInfo *vi_single_buffer;
79 static XVisualInfo *vi_double_buffer;
80 XVisualInfo *vi_immediate,
84 XSetWindowAttributes swa;
87 #ifdef G4MULTITHREADED
88 GLXContext cxVisSubThread;
96 XSizeHints *norm_hints;
98 XClassHint *class_hints;
100 XSizeHints *size_hints;
102 XTextProperty windowName,
104 char charViewName [100];
108 G4OpenGLXViewer (
const G4OpenGLXViewer&);
109 G4OpenGLXViewer& operator = (
const G4OpenGLXViewer&);