00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkMesaTexture.h 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 __vtkMesaTexture_h 00023 #define __vtkMesaTexture_h 00024 00025 #include "vtkTexture.h" 00026 00027 class vtkWindow; 00028 class vtkMesaRenderer; 00029 class vtkRenderWindow; 00030 00031 class VTK_RENDERING_EXPORT vtkMesaTexture : public vtkTexture 00032 { 00033 public: 00034 static vtkMesaTexture *New(); 00035 vtkTypeMacro(vtkMesaTexture,vtkTexture); 00036 virtual void PrintSelf(ostream& os, vtkIndent indent); 00037 00039 void Load(vtkRenderer *ren); 00040 00045 void ReleaseGraphicsResources(vtkWindow *); 00046 00047 protected: 00048 vtkMesaTexture(); 00049 ~vtkMesaTexture(); 00050 00051 unsigned char *ResampleToPowerOfTwo(int &xsize, int &ysize, 00052 unsigned char *dptr, int bpp); 00053 00054 vtkTimeStamp LoadTime; 00055 long Index; 00056 static long GlobalIndex; 00057 vtkRenderWindow *RenderWindow; // RenderWindow used for previous render 00058 private: 00059 vtkMesaTexture(const vtkMesaTexture&); // Not implemented. 00060 void operator=(const vtkMesaTexture&); // Not implemented. 00061 }; 00062 00063 #endif