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 "vtkRenderingOpenGLModule.h" // For export macro
26 #include "vtkTexture.h"
27 //BTX
28 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
29 //ETX
30 
31 class vtkWindow;
32 class vtkOpenGLRenderer;
33 class vtkRenderWindow;
35 
37 {
38 public:
39  static vtkOpenGLTexture *New();
40  vtkTypeMacro(vtkOpenGLTexture, vtkTexture);
41  virtual void PrintSelf(ostream& os, vtkIndent indent);
42 
44  void Load(vtkRenderer*);
45 
46  // Descsription:
47  // Clean up after the rendering is complete.
48  virtual void PostRender(vtkRenderer*);
49 
55 
57 
59  vtkGetMacro(Index, long);
61 
62 protected:
63 //BTX
66 
67  unsigned char *ResampleToPowerOfTwo(int &xsize, int &ysize,
68  unsigned char *dptr, int bpp);
69 
71  unsigned int Index; // actually GLuint
72  vtkWeakPointer<vtkRenderWindow> RenderWindow; // RenderWindow used for previous render
77 
78 private:
79  vtkOpenGLTexture(const vtkOpenGLTexture&); // Not implemented.
80  void operator=(const vtkOpenGLTexture&); // Not implemented.
81 
83  virtual void Initialize(vtkRenderer * ren);
84 
85 //ETX
86 };
87 
88 #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:63
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()
#define VTKRENDERINGOPENGL_EXPORT
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