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 =========================================================================*/
25 #ifndef vtkOpenGLTexture_h
26 #define vtkOpenGLTexture_h
27 
28 #include "vtkRenderingOpenGLModule.h" // For export macro
29 #include "vtkTexture.h"
30 //BTX
31 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
32 //ETX
33 
34 class vtkWindow;
35 class vtkOpenGLRenderer;
36 class vtkRenderWindow;
38 
39 class VTKRENDERINGOPENGL_EXPORT vtkOpenGLTexture : public vtkTexture
40 {
41 public:
42  static vtkOpenGLTexture *New();
43  vtkTypeMacro(vtkOpenGLTexture, vtkTexture);
44  virtual void PrintSelf(ostream& os, vtkIndent indent);
45 
47  void Load(vtkRenderer*);
48 
49  // Descsription:
50  // Clean up after the rendering is complete.
51  virtual void PostRender(vtkRenderer*);
52 
58 
60 
62  vtkGetMacro(Index, long);
64 
65 protected:
66 //BTX
69 
70  unsigned char *ResampleToPowerOfTwo(int &xsize, int &ysize,
71  unsigned char *dptr, int bpp);
72 
74  unsigned int Index; // actually GLuint
75  vtkWeakPointer<vtkRenderWindow> RenderWindow; // RenderWindow used for previous render
80 
81 private:
82  vtkOpenGLTexture(const vtkOpenGLTexture&); // Not implemented.
83  void operator=(const vtkOpenGLTexture&); // Not implemented.
84 
86  virtual void Initialize(vtkRenderer * ren);
87 
88 //ETX
89 };
90 
91 #endif
virtual void PostRender(vtkRenderer *)
Definition: vtkTexture.h:83
vtkTimeStamp LoadTime
record modification and/or execution time
Definition: vtkTimeStamp.h:34
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkTexture.h:88
abstract specification for renderers
Definition: vtkRenderer.h:62
bool SupportsNonPowerOfTwoTextures
virtual void Load(vtkRenderer *)
Definition: vtkTexture.h:93
void PrintSelf(ostream &os, vtkIndent indent)
OpenGL texture map.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
a simple class to control print indentation
Definition: vtkIndent.h:38
static vtkTexture * New()
handles properties associated with a texture map
Definition: vtkTexture.h:69
abstracts an OpenGL pixel buffer object.
vtkWeakPointer< vtkRenderWindow > RenderWindow
create a window for renderers to draw into
vtkPixelBufferObject * PBO
OpenGL renderer.
unsigned int Index