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 =========================================================================*/
26 #ifndef vtkOpenGLTexture_h
27 #define vtkOpenGLTexture_h
28 
29 #include "vtkRenderingOpenGLModule.h" // For export macro
30 #include "vtkTexture.h"
31 
32 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
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  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45 
49  void Load(vtkRenderer*);
50 
51  // Descsription:
52  // Clean up after the rendering is complete.
53  virtual void PostRender(vtkRenderer*);
54 
62 
64 
68  vtkGetMacro(Index, long);
70 
71 protected:
72 
75 
76  unsigned char *ResampleToPowerOfTwo(int &xsize, int &ysize,
77  unsigned char *dptr, int bpp);
78 
80  unsigned int Index; // actually GLuint
81  vtkWeakPointer<vtkRenderWindow> RenderWindow; // RenderWindow used for previous render
86 
87 private:
88  vtkOpenGLTexture(const vtkOpenGLTexture&) VTK_DELETE_FUNCTION;
89  void operator=(const vtkOpenGLTexture&) VTK_DELETE_FUNCTION;
90 
94  virtual void Initialize(vtkRenderer * ren);
95 
96 };
97 
98 #endif
vtkOpenGLTexture::vtkOpenGLTexture
vtkOpenGLTexture()
vtkOpenGLTexture::PBO
vtkPixelBufferObject * PBO
Definition: vtkOpenGLTexture.h:85
vtkOpenGLTexture::~vtkOpenGLTexture
~vtkOpenGLTexture()
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkOpenGLTexture::CheckedHardwareSupport
bool CheckedHardwareSupport
Definition: vtkOpenGLTexture.h:82
vtkOpenGLTexture::RenderWindow
vtkWeakPointer< vtkRenderWindow > RenderWindow
Definition: vtkOpenGLTexture.h:81
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkOpenGLTexture::New
static vtkOpenGLTexture * New()
vtkOpenGLTexture::Load
void Load(vtkRenderer *)
Implement base class method.
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:71
vtkOpenGLTexture::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOpenGLTexture::Index
unsigned int Index
Definition: vtkOpenGLTexture.h:80
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkOpenGLTexture::PostRender
virtual void PostRender(vtkRenderer *)
Cleans up after the texture rendering to restore the state of the graphics context.
vtkOpenGLRenderer
OpenGL renderer.
Definition: vtkOpenGLRenderer.h:37
vtkOpenGLTexture::ResampleToPowerOfTwo
unsigned char * ResampleToPowerOfTwo(int &xsize, int &ysize, unsigned char *dptr, int bpp)
vtkWeakPointer.h
vtkOpenGLTexture::LoadTime
vtkTimeStamp LoadTime
Definition: vtkOpenGLTexture.h:79
vtkTexture.h
vtkOpenGLTexture::SupportsNonPowerOfTwoTextures
bool SupportsNonPowerOfTwoTextures
Definition: vtkOpenGLTexture.h:83
vtkOpenGLTexture::SupportsPBO
bool SupportsPBO
Definition: vtkOpenGLTexture.h:84
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkOpenGLTexture::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this texture.
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:87
vtkOpenGLTexture
OpenGL texture map.
Definition: vtkOpenGLTexture.h:40
vtkPixelBufferObject
abstracts an OpenGL pixel buffer object.
Definition: vtkPixelBufferObject.h:44
vtkWeakPointer< vtkRenderWindow >