library: libCore #include "TVirtualGL.h"

# TVirtualGL

class description - source file - inheritance tree (.pdf)

## class TVirtualGL : public TNamed

| Inheritance Chart:
`TObject`
| <- | `TNamed`
| <- | `TVirtualGL` |

This is an abstract class, constructors will not be documented.
Look at the header to check for available constructors.

        public:

                      virtual ~TVirtualGL()
                 virtual void AddRotation(Double_t* rotmatrix, Double_t* extraangles)
                 virtual void BeginGL(EG3D2GLmode)
                 virtual void BeginGLCmd(EG3D2GLmode mode)
               static TClass* Class()
                 virtual void ClearColor(Int_t color)
                 virtual void ClearGL(UInt_t bufbits)
                 virtual void ClearGLColor(Float_t red, Float_t green, Float_t blue, Float_t alpha)
                 virtual void ClearGLDepth(Float_t val)
              virtual ULong_t CreateContext(Window_t wind)
                virtual Int_t CreateGLLists(Int_t range)
             virtual Window_t CreateGLWindow(Window_t wind)
                 virtual void CullFaceGL(EG3D2GLmode)
                 virtual void DeleteContext(ULong_t ctx)
                 virtual void DeleteGLLists(Int_t ilist, Int_t range)
                 virtual void DisableGL(EG3D2GLmode mode)
                 virtual void DrawFaceSet(const Double_t* pnts, const Int_t* pols, const Double_t* normals, const Float_t* mat, UInt_t size)
                 virtual void DrawSelectionBox(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax)
                 virtual void DrawSphere(const Float_t* rgba)
                 virtual void DrawViewer(TGLViewer* viewer)
                 virtual void EnableGL(EG3D2GLmode mode)
                 virtual void EndGL()
                 virtual void EndGLCmd()
                 virtual void EndGLList()
                 virtual void EnterSelectionMode(UInt_t* buff, Int_t size, Event_t*, Int_t* viewport)
                virtual Int_t ExitSelectionMode()
                 virtual void FlushGL()
                 virtual void FrontGLFace(EG3D2GLmode faceflag)
                 virtual void FrustumGL(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t znear, Double_t zfar)
                 virtual void GetGL(EG3D2GLmode mode, UChar_t* params)
                 virtual void GetGL(EG3D2GLmode mode, Double_t* params)
                 virtual void GetGL(EG3D2GLmode mode, Float_t* params)
                 virtual void GetGL(EG3D2GLmode mode, Int_t* params)
                virtual Int_t GetGLError()
               virtual Bool_t GetRootLight()
               virtual Bool_t GetTrueColorMode()
                 virtual void GLLight(EG3D2GLmode name, EG3D2GLmode prop_name, const Float_t* lig_prop)
                 virtual void GLLoadName(UInt_t name)
          static TVirtualGL*& Instance()
              virtual TClass* IsA() const
                 virtual void LightModel(EG3D2GLmode name, const Float_t* lig_prop)
                 virtual void LightModel(EG3D2GLmode name, Int_t prop)
                 virtual void MakeCurrent(Window_t wind, ULong_t ctx)
                 virtual void MaterialGL(EG3D2GLmode face, const Float_t* mat_prop)
                 virtual void MaterialGL(EG3D2GLmode face, Float_t mat_prop)
                 virtual void MatrixModeGL(EG3D2GLmode matrix)
                 virtual void MultGLMatrix(Double_t* mat)
                 virtual void NewGLList(UInt_t ilist = 1, EG3D2GLmode mode = kCOMPILE)
                 virtual void NewGLModelView(Int_t ilist)
                 virtual void NewModelView(Double_t* angles, Double_t* delta)
                 virtual void NewMVGL()
                 virtual void NewPRGL()
                 virtual void NewProjectionView(Double_t* viewboxmin, Double_t* viewboxmax, Bool_t perspective = kTRUE)
                  TVirtualGL& operator=(const TVirtualGL&)
                 virtual void PaintBrik(Float_t* vertex)
                 virtual void PaintCone(Float_t* vertex, Int_t ndiv, Int_t nstacks)
                 virtual void PaintGLPoints(Int_t n, Float_t* p, Option_t* option)
                 virtual void PaintGLPointsObject(const TPoints3DABC* points, Option_t* option = "")
                 virtual void PaintPolyLine(Int_t n, Float_t* p, Option_t* option)
                 virtual void PaintPolyLine(Int_t n, Double_t* p, Option_t* option)
                 virtual void PaintPolyMarker(const Double_t* place, Style_t marker_style, UInt_t size)
                 virtual void PaintXtru(Float_t* vertex, Int_t nxy, Int_t nz)
                 virtual void PolygonGLMode(EG3D2GLmode face, EG3D2GLmode mode)
                 virtual void PopGLMatrix()
                 virtual void PrintObjects(Int_t format, Int_t sort, TGLViewer* viewer, TGLWindow* glWin, Float_t rad, Float_t yc, Float_t zc)
                 virtual void PushGLMatrix()
                 virtual void RotateGL(Double_t angle, Double_t x, Double_t y, Double_t z)
                 virtual void RotateGL(Double_t Theta, Double_t Phi, Double_t Psi)
                 virtual void RunGLList(Int_t list)
               virtual Bool_t SelectViewer(TGLViewer* viewer, const TGLRect* rect)
                 virtual void SetGLColor(Float_t* rgb)
                 virtual void SetGLColorIndex(Int_t color)
                 virtual void SetGLLineWidth(Float_t width)
                 virtual void SetGLNormal(const Double_t* norm)
                 virtual void SetGLPointSize(Float_t size)
                 virtual void SetGLVertex(const Double_t* vert)
                 virtual void SetGLVertex(Float_t* vertex)
                 virtual void SetLineAttr(Color_t color, Int_t width = 1)
                 virtual void SetRootLight(Bool_t flag = kTRUE)
                 virtual void SetStack(Double_t* matrix = 0)
                 virtual void SetTrueColorMode(Bool_t flag = kTRUE)
                 virtual void ShadeGLModel(EG3D2GLmode mode)
                 virtual void ShowMembers(TMemberInspector& insp, char* parent)
                 virtual void Streamer(TBuffer& b)
                         void StreamerNVirtual(TBuffer& b)
                 virtual void SwapBuffers(Window_t wind)
                 virtual void TranslateGL(Double_t x, Double_t y, Double_t z)
                 virtual void UpdateMatrix(Double_t* translate = 0, Double_t* rotate = 0, Bool_t isreflection = kFALSE)
                 virtual void ViewportGL(Int_t xmin, Int_t ymin, Int_t width, Int_t height)

### Data Members

        protected:

          TVirtualGLImp* fImp

## Class Description

     TVirtualGL

     The TVirtualGL class is an abstract base class defining the
     OpenGL interface protocol. All interactions with OpenGL should be
     done via the global pointer gVirtualGL. If the OpenGL library is
     available this pointer is pointing to an instance of the TGLKernel
     class which provides the actual interface to OpenGL. Using this
     scheme of ABC we can use OpenGL in other parts of the framework
     without having to link with the OpenGL library in case we don't
     use the classes using OpenGL.

### Inline Functions

                    void ~TVirtualGL()
                Window_t CreateGLWindow(Window_t wind)
                 ULong_t CreateContext(Window_t wind)
                    void DeleteContext(ULong_t ctx)
                    void MakeCurrent(Window_t wind, ULong_t ctx)
                    void SwapBuffers(Window_t wind)
                    void AddRotation(Double_t* rotmatrix, Double_t* extraangles)
                    void BeginGLCmd(EG3D2GLmode mode)
                    void ClearGL(UInt_t bufbits)
                    void ClearColor(Int_t color)
                    void ClearGLColor(Float_t red, Float_t green, Float_t blue, Float_t alpha)
                    void ClearGLDepth(Float_t val)
                    void MatrixModeGL(EG3D2GLmode matrix)
                    void NewMVGL()
                    void NewPRGL()
                    void FrustumGL(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t znear, Double_t zfar)
                    void GLLight(EG3D2GLmode name, EG3D2GLmode prop_name, const Float_t* lig_prop)
                    void LightModel(EG3D2GLmode name, const Float_t* lig_prop)
                    void LightModel(EG3D2GLmode name, Int_t prop)
                    void CullFaceGL(EG3D2GLmode)
                    void ViewportGL(Int_t xmin, Int_t ymin, Int_t width, Int_t height)
                    void MaterialGL(EG3D2GLmode face, const Float_t* mat_prop)
                    void MaterialGL(EG3D2GLmode face, Float_t mat_prop)
                    void BeginGL(EG3D2GLmode)
                    void EndGL()
                    void SetGLVertex(const Double_t* vert)
                    void SetGLVertex(Float_t* vertex)
                    void SetGLNormal(const Double_t* norm)
                    void PaintPolyMarker(const Double_t* place, Style_t marker_style, UInt_t size)
                    void DrawSelectionBox(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax)
                    void EnterSelectionMode(UInt_t* buff, Int_t size, Event_t*, Int_t* viewport)
                   Int_t ExitSelectionMode()
                    void GLLoadName(UInt_t name)
                    void DrawFaceSet(const Double_t* pnts, const Int_t* pols, const Double_t* normals, const Float_t* mat, UInt_t size)
                   Int_t CreateGLLists(Int_t range)
                    void DeleteGLLists(Int_t ilist, Int_t range)
                    void DisableGL(EG3D2GLmode mode)
                    void EnableGL(EG3D2GLmode mode)
                    void EndGLList()
                    void EndGLCmd()
                    void FlushGL()
                    void FrontGLFace(EG3D2GLmode faceflag)
                    void GetGL(EG3D2GLmode mode, UChar_t* params)
                    void GetGL(EG3D2GLmode mode, Double_t* params)
                    void GetGL(EG3D2GLmode mode, Float_t* params)
                    void GetGL(EG3D2GLmode mode, Int_t* params)
                   Int_t GetGLError()
                    void MultGLMatrix(Double_t* mat)
                    void NewGLList(UInt_t ilist = 1, EG3D2GLmode mode = kCOMPILE)
                    void NewGLModelView(Int_t ilist)
                    void PaintGLPoints(Int_t n, Float_t* p, Option_t* option)
                    void PolygonGLMode(EG3D2GLmode face, EG3D2GLmode mode)
                    void PushGLMatrix()
                    void PopGLMatrix()
                    void RotateGL(Double_t angle, Double_t x, Double_t y, Double_t z)
                    void RotateGL(Double_t Theta, Double_t Phi, Double_t Psi)
                    void SetGLColor(Float_t* rgb)
                    void SetGLColorIndex(Int_t color)
                    void SetGLLineWidth(Float_t width)
                    void SetGLPointSize(Float_t size)
                    void SetStack(Double_t* matrix = 0)
                    void ShadeGLModel(EG3D2GLmode mode)
                    void TranslateGL(Double_t x, Double_t y, Double_t z)
                    void RunGLList(Int_t list)
                    void NewProjectionView(Double_t* viewboxmin, Double_t* viewboxmax, Bool_t perspective = kTRUE)
                    void NewModelView(Double_t* angles, Double_t* delta)
                    void PaintCone(Float_t* vertex, Int_t ndiv, Int_t nstacks)
                    void PaintPolyLine(Int_t n, Float_t* p, Option_t* option)
                    void PaintPolyLine(Int_t n, Double_t* p, Option_t* option)
                    void PaintGLPointsObject(const TPoints3DABC* points, Option_t* option = "")
                    void PaintBrik(Float_t* vertex)
                    void PaintXtru(Float_t* vertex, Int_t nxy, Int_t nz)
                    void SetLineAttr(Color_t color, Int_t width = 1)
                    void UpdateMatrix(Double_t* translate = 0, Double_t* rotate = 0, Bool_t isreflection = kFALSE)
                  Bool_t GetRootLight()
                    void SetRootLight(Bool_t flag = kTRUE)
                  Bool_t GetTrueColorMode()
                    void SetTrueColorMode(Bool_t flag = kTRUE)
                    void DrawViewer(TGLViewer* viewer)
                  Bool_t SelectViewer(TGLViewer* viewer, const TGLRect* rect)
                    void DrawSphere(const Float_t* rgba)
                    void PrintObjects(Int_t format, Int_t sort, TGLViewer* viewer, TGLWindow* glWin, Float_t rad, Float_t yc, Float_t zc)
            TVirtualGL*& Instance()
                 TClass* Class()
                 TClass* IsA() const
                    void ShowMembers(TMemberInspector& insp, char* parent)
                    void Streamer(TBuffer& b)
                    void StreamerNVirtual(TBuffer& b)
             TVirtualGL& operator=(const TVirtualGL&)

Author: Valery Fine(fine@vxcern.cern.ch) 05/03/97
Last update: root/base:$Name: $:$Id: TVirtualGL.h,v 1.17 2005/05/25 14:25:16 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *