TVirtualGL.cxx

Go to the documentation of this file.
00001 // @(#)root/base:$Id: TVirtualGL.cxx 20877 2007-11-19 11:17:07Z rdm $
00002 // Author: Valery Fine(fine@vxcern.cern.ch)   05/03/97
00003 
00004 //////////////////////////////////////////////////////////////////////////
00005 //                                                                      //
00006 // TVirtualGL                                                           //
00007 //                                                                      //
00008 // The TVirtualGL class is an abstract base class defining the          //
00009 // OpenGL interface protocol. All interactions with OpenGL should be    //
00010 // done via the global pointer gVirtualGL. If the OpenGL library is     //
00011 // available this pointer is pointing to an instance of the TGLKernel   //
00012 // class which provides the actual interface to OpenGL. Using this      //
00013 // scheme of ABC we can use OpenGL in other parts of the framework      //
00014 // without having to link with the OpenGL library in case we don't      //
00015 // use the classes using OpenGL.                                        //
00016 //                                                                      //
00017 //////////////////////////////////////////////////////////////////////////
00018 
00019 #include "TVirtualGL.h"
00020 #include "TROOT.h"
00021 
00022 
00023 ClassImp(TGLManager)
00024 
00025 TGLManager * (*gPtr2GLManager)() = 0;
00026 
00027 //____________________________________________________________________________
00028 TGLManager::TGLManager() : TNamed("gGLManager", "")
00029 {
00030 }
00031 
00032 //____________________________________________________________________________
00033 TGLManager *&TGLManager::Instance()
00034 {
00035    // Return the global GL Manager.
00036 
00037    static TGLManager *instance = 0;
00038 
00039    if(gPtr2GLManager) {
00040       instance = gPtr2GLManager();
00041    }
00042 
00043    return instance;
00044 }
00045 
00046 ClassImp(TVirtualGLPainter)
00047 
00048 
00049 ClassImp(TVirtualGLManip)
00050 
00051 ClassImp(TGLPaintDevice)

Generated on Tue Jul 5 14:11:24 2011 for ROOT_528-00b_version by  doxygen 1.5.1