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 
00108 #ifndef __vtkOpenGLExtensionManager
00109 #define __vtkOpenGLExtensionManager
00110 
00111 #include <vtkObject.h>
00112 
00113 class vtkRenderWindow;
00114 
00115 //BTX
00116 extern "C" {
00117 #ifdef _WIN32
00118 #include <vtkOpenGL.h>  // Needed for WINAPI
00119   typedef int (WINAPI *vtkOpenGLExtensionManagerFunctionPointer)(void);
00120 #else
00121   typedef void (*vtkOpenGLExtensionManagerFunctionPointer)(void);
00122 #endif
00123 }
00124 //ETX
00125 
00126 class VTK_RENDERING_EXPORT vtkOpenGLExtensionManager : public vtkObject
00127 {
00128 public:
00129   vtkTypeRevisionMacro(vtkOpenGLExtensionManager, vtkObject);
00130   static vtkOpenGLExtensionManager *New();
00131   void PrintSelf(ostream &os, vtkIndent indent);
00132 
00134 
00136   vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
00137   virtual void SetRenderWindow(vtkRenderWindow *renwin);
00139 
00141   virtual void Update();
00142 
00144 
00146   vtkGetStringMacro(ExtensionsString);
00148 
00150   virtual int ExtensionSupported(const char *name);
00151 
00152 //BTX
00155   virtual vtkOpenGLExtensionManagerFunctionPointer GetProcAddress(const char *fname);
00156 //ETX
00157 
00160   virtual void LoadExtension(const char *name);
00161 
00162 protected:
00163   vtkOpenGLExtensionManager();
00164   virtual ~vtkOpenGLExtensionManager();
00165 
00166   vtkRenderWindow *RenderWindow;
00167 
00168   char *ExtensionsString;
00169 
00170   vtkTimeStamp BuildTime;
00171 
00172   virtual void ReadOpenGLExtensions();
00173 
00174 private:
00175   vtkOpenGLExtensionManager(const vtkOpenGLExtensionManager&); // Not implemented
00176   void operator=(const vtkOpenGLExtensionManager&); // Not implemented
00177 };
00178 
00179 #endif //__vtkOpenGLExtensionManager
00180 

Generated on Thu Sep 7 11:42:44 2006 for VTK by  doxygen 1.4.3-20050530