• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Rendering/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 #include <vtkWeakPointer.h> // needed for vtkWeakPointer.
00131 
00132 class vtkRenderWindow;
00133 
00134 //BTX
00135 extern "C" {
00136 #ifdef _WIN32
00137 #include <vtkOpenGL.h>  // Needed for WINAPI
00138   typedef int (WINAPI *vtkOpenGLExtensionManagerFunctionPointer)(void);
00139 #else
00140   typedef void (*vtkOpenGLExtensionManagerFunctionPointer)(void);
00141 #endif
00142 }
00143 //ETX
00144 
00145 class VTK_RENDERING_EXPORT vtkOpenGLExtensionManager : public vtkObject
00146 {
00147 public:
00148   vtkTypeRevisionMacro(vtkOpenGLExtensionManager, vtkObject);
00149   static vtkOpenGLExtensionManager *New();
00150   void PrintSelf(ostream &os, vtkIndent indent);
00151 
00153 
00155   vtkRenderWindow* GetRenderWindow();
00156   virtual void SetRenderWindow(vtkRenderWindow *renwin);
00158 
00160   virtual void Update();
00161 
00163 
00165   vtkGetStringMacro(ExtensionsString);
00167 
00169   virtual int ExtensionSupported(const char *name);
00170 
00171 //BTX
00173 
00175   virtual vtkOpenGLExtensionManagerFunctionPointer GetProcAddress(
00176     const char *fname);
00178 //ETX
00179 
00184   virtual void LoadExtension(const char *name);
00185 
00192   virtual int LoadSupportedExtension(const char *name);
00193 
00194   
00226   virtual void LoadCorePromotedExtension(const char *name);
00227 //BTX
00228 protected:
00229   vtkOpenGLExtensionManager();
00230   virtual ~vtkOpenGLExtensionManager();
00231 
00232 
00233   int OwnRenderWindow;
00234   char *ExtensionsString;
00235 
00236   vtkTimeStamp BuildTime;
00237 
00238   virtual void ReadOpenGLExtensions();
00239   
00245   virtual int SafeLoadExtension(const char *name);
00246 
00247 private:
00248   vtkOpenGLExtensionManager(const vtkOpenGLExtensionManager&); // Not implemented
00249   void operator=(const vtkOpenGLExtensionManager&); // Not implemented
00250 
00251   vtkWeakPointer<vtkRenderWindow> RenderWindow;
00252 //ETX
00253 };
00254 
00255 #endif //__vtkOpenGLExtensionManager

Generated by  doxygen 1.7.1