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
34class vtkWindow;
36class vtkRenderWindow;
38
39class VTKRENDERINGOPENGL_EXPORT vtkOpenGLTexture : public vtkTexture
40{
41public:
44 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45
50
51 // Descsription:
52 // Clean up after the rendering is complete.
53 virtual void PostRender(vtkRenderer*);
54
62
64
68 vtkGetMacro(Index, long);
70
71protected:
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
87private:
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
a simple class to control print indentation
Definition: vtkIndent.h:40
OpenGL renderer.
OpenGL texture map.
void Load(vtkRenderer *)
Implement base class method.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
unsigned char * ResampleToPowerOfTwo(int &xsize, int &ysize, unsigned char *dptr, int bpp)
static vtkOpenGLTexture * New()
vtkWeakPointer< vtkRenderWindow > RenderWindow
virtual void PostRender(vtkRenderer *)
Cleans up after the texture rendering to restore the state of the graphics context.
vtkTimeStamp LoadTime
bool SupportsNonPowerOfTwoTextures
vtkPixelBufferObject * PBO
void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this texture.
unsigned int Index
abstracts an OpenGL pixel buffer object.
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:64
handles properties associated with a texture map
Definition: vtkTexture.h:71
record modification and/or execution time
Definition: vtkTimeStamp.h:36
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35