VTK  9.3.0
vtkPBRPrefilterTexture.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkPBRPrefilterTexture_h
17 #define vtkPBRPrefilterTexture_h
18 
19 #include "vtkOpenGLTexture.h"
20 #include "vtkRenderingOpenGL2Module.h" // For export macro
21 
22 VTK_ABI_NAMESPACE_BEGIN
25 class vtkOpenGLTexture;
26 class vtkRenderWindow;
27 
28 class VTKRENDERINGOPENGL2_EXPORT vtkPBRPrefilterTexture : public vtkOpenGLTexture
29 {
30 public:
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
40  vtkGetObjectMacro(InputTexture, vtkOpenGLTexture);
42 
46  void Load(vtkRenderer*) override;
47 
51  void Render(vtkRenderer* ren) override { this->Load(ren); }
52 
54 
57  vtkGetMacro(PrefilterSize, unsigned int);
59 
61 
65  vtkGetMacro(PrefilterLevels, unsigned int);
66  vtkSetMacro(PrefilterLevels, unsigned int);
68 
70 
76  vtkGetMacro(PrefilterMaxSamples, unsigned int);
77  vtkSetMacro(PrefilterMaxSamples, unsigned int);
79 
81 
86  vtkGetMacro(ConvertToLinear, bool);
87  vtkSetMacro(ConvertToLinear, bool);
88  vtkBooleanMacro(ConvertToLinear, bool);
90 
92 
98  vtkGetMacro(HalfPrecision, bool);
99  vtkSetMacro(HalfPrecision, bool);
100  vtkBooleanMacro(HalfPrecision, bool);
102 
110 
111 protected:
114 
115  unsigned int PrefilterSize;
116  unsigned int PrefilterLevels = 5;
117  unsigned int PrefilterMaxSamples = 512;
118  vtkOpenGLTexture* InputTexture = nullptr;
119  bool ConvertToLinear = false;
120  bool HalfPrecision = true;
121 
122 private:
124  void operator=(const vtkPBRPrefilterTexture&) = delete;
125 };
126 
127 VTK_ABI_NAMESPACE_END
128 #endif
a simple class to control print indentation
Definition: vtkIndent.h:29
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
static vtkPBRPrefilterTexture * New()
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.
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:62
window superclass for vtkRenderWindow
Definition: vtkWindow.h:28