VTK  9.4.20241222
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
22
23VTK_ABI_NAMESPACE_BEGIN
27class vtkRenderWindow;
28
29class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkPBRPrefilterTexture : public vtkOpenGLTexture
30{
31public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
37
41 vtkGetObjectMacro(InputTexture, vtkOpenGLTexture);
43
47 void Load(vtkRenderer*) override;
48
52 void Render(vtkRenderer* ren) override { this->Load(ren); }
53
55
58 vtkGetMacro(PrefilterSize, unsigned int);
60
62
66 vtkGetMacro(PrefilterLevels, unsigned int);
67 vtkSetMacro(PrefilterLevels, unsigned int);
69
71
77 vtkGetMacro(PrefilterMaxSamples, unsigned int);
78 vtkSetMacro(PrefilterMaxSamples, unsigned int);
80
82
87 vtkGetMacro(ConvertToLinear, bool);
88 vtkSetMacro(ConvertToLinear, bool);
89 vtkBooleanMacro(ConvertToLinear, bool);
91
93
99 vtkGetMacro(HalfPrecision, bool);
100 vtkSetMacro(HalfPrecision, bool);
101 vtkBooleanMacro(HalfPrecision, bool);
103
111
112protected:
115
116 unsigned int PrefilterSize;
117 unsigned int PrefilterLevels = 5;
118 unsigned int PrefilterMaxSamples = 512;
119 vtkOpenGLTexture* InputTexture = nullptr;
120 bool ConvertToLinear = false;
121 bool HalfPrecision = true;
122
123private:
125 void operator=(const vtkPBRPrefilterTexture&) = delete;
126};
127
128VTK_ABI_NAMESPACE_END
129#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
#define VTK_MARSHALAUTO