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();
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
vtkOpenGLTexture::vtkOpenGLTexture
vtkOpenGLTexture()
vtkOpenGLTexture::PBO
vtkPixelBufferObject * PBO
Definition: vtkOpenGLTexture.h:76
vtkOpenGLTexture::~vtkOpenGLTexture
~vtkOpenGLTexture()
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkRenderingOpenGLModule.h
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkOpenGLTexture::CheckedHardwareSupport
bool CheckedHardwareSupport
Definition: vtkOpenGLTexture.h:73
vtkOpenGLTexture::RenderWindow
vtkWeakPointer< vtkRenderWindow > RenderWindow
Definition: vtkOpenGLTexture.h:72
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkOpenGLTexture::New
static vtkOpenGLTexture * New()
vtkOpenGLTexture::Load
void Load(vtkRenderer *)
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:70
vtkOpenGLTexture::Index
unsigned int Index
Definition: vtkOpenGLTexture.h:71
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkOpenGLTexture::PostRender
virtual void PostRender(vtkRenderer *)
vtkOpenGLRenderer
OpenGL renderer.
Definition: vtkOpenGLRenderer.h:36
vtkOpenGLTexture::ResampleToPowerOfTwo
unsigned char * ResampleToPowerOfTwo(int &xsize, int &ysize, unsigned char *dptr, int bpp)
vtkWeakPointer.h
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkOpenGLTexture::LoadTime
vtkTimeStamp LoadTime
Definition: vtkOpenGLTexture.h:70
vtkTexture.h
vtkOpenGLTexture::SupportsNonPowerOfTwoTextures
bool SupportsNonPowerOfTwoTextures
Definition: vtkOpenGLTexture.h:74
vtkOpenGLTexture::SupportsPBO
bool SupportsPBO
Definition: vtkOpenGLTexture.h:75
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkOpenGLTexture::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *)
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:89
vtkOpenGLTexture
OpenGL texture map.
Definition: vtkOpenGLTexture.h:37
vtkOpenGLTexture::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkPixelBufferObject
abstracts an OpenGL pixel buffer object.
Definition: vtkPixelBufferObject.h:43
vtkWeakPointer< vtkRenderWindow >
VTKRENDERINGOPENGL_EXPORT
#define VTKRENDERINGOPENGL_EXPORT
Definition: vtkRenderingOpenGLModule.h:15