Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkOpenGLExtensionManager.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 
00003 /*=========================================================================
00004 
00005   Program:   Visualization Toolkit
00006   Module:    $RCSfile: vtkOpenGLExtensionManager.h,v $
00007 
00008   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00009   All rights reserved.
00010   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notice for more information.
00015 
00016   Copyright 2003 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00018   license for use of this work by or on behalf of the
00019   U.S. Government. Redistribution and use in source and binary forms, with
00020   or without modification, are permitted provided that this Notice and any
00021   statement of authorship are reproduced on all copies.
00022 
00023 =========================================================================*/
00024 
00126 #ifndef __vtkOpenGLExtensionManager_h
00127 #define __vtkOpenGLExtensionManager_h
00128 
00129 #include <vtkObject.h>
00130 
00131 class vtkRenderWindow;
00132 
00133 //BTX
00134 extern "C" {
00135 #ifdef _WIN32
00136 #include <vtkOpenGL.h>  // Needed for WINAPI
00137   typedef int (WINAPI *vtkOpenGLExtensionManagerFunctionPointer)(void);
00138 #else
00139   typedef void (*vtkOpenGLExtensionManagerFunctionPointer)(void);
00140 #endif
00141 }
00142 //ETX
00143 
00144 class VTK_RENDERING_EXPORT vtkOpenGLExtensionManager : public vtkObject
00145 {
00146 public:
00147   vtkTypeRevisionMacro(vtkOpenGLExtensionManager, vtkObject);
00148   static vtkOpenGLExtensionManager *New();
00149   void PrintSelf(ostream &os, vtkIndent indent);
00150 
00152 
00154   vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
00155   virtual void SetRenderWindow(vtkRenderWindow *renwin);
00157 
00159   virtual void Update();
00160 
00162 
00164   vtkGetStringMacro(ExtensionsString);
00166 
00168   virtual int ExtensionSupported(const char *name);
00169 
00170 //BTX
00172 
00174   virtual vtkOpenGLExtensionManagerFunctionPointer GetProcAddress(
00175     const char *fname);
00177 //ETX
00178 
00183   virtual void LoadExtension(const char *name);
00184 
00191   virtual int LoadSupportedExtension(const char *name);
00192 
00193   
00225   virtual void LoadCorePromotedExtension(const char *name);
00226   
00227 protected:
00228   vtkOpenGLExtensionManager();
00229   virtual ~vtkOpenGLExtensionManager();
00230 
00231   vtkRenderWindow *RenderWindow;
00232 
00233   char *ExtensionsString;
00234 
00235   vtkTimeStamp BuildTime;
00236 
00237   virtual void ReadOpenGLExtensions();
00238   
00244   virtual int SafeLoadExtension(const char *name);
00245 
00246 private:
00247   vtkOpenGLExtensionManager(const vtkOpenGLExtensionManager&); // Not implemented
00248   void operator=(const vtkOpenGLExtensionManager&); // Not implemented
00249 };
00250 
00251 #endif //__vtkOpenGLExtensionManager

Generated on Mon Jan 21 23:07:35 2008 for VTK by  doxygen 1.4.3-20050530