VTK  9.1.0
vtkPBRPrefilterTexture.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPBRPrefilterTexture.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 vtkPBRPrefilterTexture_h
26#define vtkPBRPrefilterTexture_h
27
28#include "vtkOpenGLTexture.h"
29#include "vtkRenderingOpenGL2Module.h" // For export macro
30
34class vtkRenderWindow;
35
36class VTKRENDERINGOPENGL2_EXPORT vtkPBRPrefilterTexture : public vtkOpenGLTexture
37{
38public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
44
48 vtkGetObjectMacro(InputTexture, vtkOpenGLTexture);
50
54 void Load(vtkRenderer*) override;
55
59 void Render(vtkRenderer* ren) override { this->Load(ren); }
60
62
65 vtkGetMacro(PrefilterSize, unsigned int);
67
69
73 vtkGetMacro(PrefilterLevels, unsigned int);
74 vtkSetMacro(PrefilterLevels, unsigned int);
76
78
84 vtkGetMacro(PrefilterMaxSamples, unsigned int);
85 vtkSetMacro(PrefilterMaxSamples, unsigned int);
87
89
94 vtkGetMacro(ConvertToLinear, bool);
95 vtkSetMacro(ConvertToLinear, bool);
96 vtkBooleanMacro(ConvertToLinear, bool);
98
106
107protected:
110
111 unsigned int PrefilterSize;
112 unsigned int PrefilterLevels = 5;
113 unsigned int PrefilterMaxSamples = 512;
114 vtkOpenGLTexture* InputTexture = nullptr;
115 bool ConvertToLinear = false;
116
117private:
119 void operator=(const vtkPBRPrefilterTexture&) = delete;
120};
121
122#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
Internal class which encapsulates OpenGL FramebufferObject.
OpenGL rendering window.
OpenGL texture map.
void Load(vtkRenderer *) override
Implement base class method.
precompute prefilter texture used in physically based rendering
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkPBRPrefilterTexture() override
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this texture.
void Load(vtkRenderer *) override
Implement base class method.
void Render(vtkRenderer *ren) override
Implement base class method.
static vtkPBRPrefilterTexture * New()
void SetInputTexture(vtkOpenGLTexture *)
Get/Set the input texture.
vtkPBRPrefilterTexture()=default
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:182
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39