00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkOpenGLTexture.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00022 #ifndef __vtkOpenGLTexture_h 00023 #define __vtkOpenGLTexture_h 00024 00025 #include "vtkTexture.h" 00026 00027 class vtkWindow; 00028 class vtkOpenGLRenderer; 00029 class vtkRenderWindow; 00030 00031 class VTK_RENDERING_EXPORT vtkOpenGLTexture : public vtkTexture 00032 { 00033 public: 00034 static vtkOpenGLTexture *New(); 00035 vtkTypeRevisionMacro(vtkOpenGLTexture,vtkTexture); 00036 virtual void PrintSelf(ostream& os, vtkIndent indent); 00037 00039 void Load(vtkRenderer *ren); 00040 00045 void ReleaseGraphicsResources(vtkWindow *); 00046 00047 protected: 00048 vtkOpenGLTexture(); 00049 ~vtkOpenGLTexture(); 00050 00051 unsigned char *ResampleToPowerOfTwo(int &xsize, int &ysize, 00052 unsigned char *dptr, int bpp); 00053 00054 vtkTimeStamp LoadTime; 00055 long Index; 00056 vtkRenderWindow *RenderWindow; // RenderWindow used for previous render 00057 private: 00058 vtkOpenGLTexture(const vtkOpenGLTexture&); // Not implemented. 00059 void operator=(const vtkOpenGLTexture&); // Not implemented. 00060 }; 00061 00062 #endif