VTK
vtkOpenGLTexture.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLTexture.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef __vtkOpenGLTexture_h
23 #define __vtkOpenGLTexture_h
24 
25 #include "vtkTexture.h"
26 //BTX
27 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
28 //ETX
29 
30 class vtkWindow;
31 class vtkOpenGLRenderer;
32 class vtkRenderWindow;
34 
36 {
37 public:
38  static vtkOpenGLTexture *New();
40  virtual void PrintSelf(ostream& os, vtkIndent indent);
41 
43  void Load(vtkRenderer *ren);
44 
45  // Descsription:
46  // Clean up after the rendering is complete.
47  virtual void PostRender(vtkRenderer *ren);
48 
54 
55 
57 
59  vtkGetMacro(Index, long);
60 //BTX
61 protected:
65 
66  unsigned char *ResampleToPowerOfTwo(int &xsize, int &ysize,
67  unsigned char *dptr, int bpp);
68 
70  unsigned int Index; // actually GLuint
71  vtkWeakPointer<vtkRenderWindow> RenderWindow; // RenderWindow used for previous render
76 
77 private:
78  vtkOpenGLTexture(const vtkOpenGLTexture&); // Not implemented.
79  void operator=(const vtkOpenGLTexture&); // Not implemented.
80 
82  virtual void Initialize(vtkRenderer * ren);
83 
84 //ETX
85 };
86 
87 #endif