VTK  9.2.6
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 =========================================================================*/
28 #ifndef vtkPBRPrefilterTexture_h
29 #define vtkPBRPrefilterTexture_h
30 
31 #include "vtkOpenGLTexture.h"
32 #include "vtkRenderingOpenGL2Module.h" // For export macro
33 
36 class vtkOpenGLTexture;
37 class vtkRenderWindow;
38 
39 class VTKRENDERINGOPENGL2_EXPORT vtkPBRPrefilterTexture : public vtkOpenGLTexture
40 {
41 public:
42  static vtkPBRPrefilterTexture* New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
50  void SetInputTexture(vtkOpenGLTexture*);
51  vtkGetObjectMacro(InputTexture, vtkOpenGLTexture);
53 
57  void Load(vtkRenderer*) override;
58 
62  void Render(vtkRenderer* ren) override { this->Load(ren); }
63 
65 
68  vtkGetMacro(PrefilterSize, unsigned int);
70 
72 
76  vtkGetMacro(PrefilterLevels, unsigned int);
77  vtkSetMacro(PrefilterLevels, unsigned int);
79 
81 
87  vtkGetMacro(PrefilterMaxSamples, unsigned int);
88  vtkSetMacro(PrefilterMaxSamples, unsigned int);
90 
92 
97  vtkGetMacro(ConvertToLinear, bool);
98  vtkSetMacro(ConvertToLinear, bool);
99  vtkBooleanMacro(ConvertToLinear, bool);
101 
103 
109  vtkGetMacro(HalfPrecision, bool);
110  vtkSetMacro(HalfPrecision, bool);
111  vtkBooleanMacro(HalfPrecision, bool);
113 
120  void ReleaseGraphicsResources(vtkWindow*) override;
121 
122 protected:
123  vtkPBRPrefilterTexture() = default;
124  ~vtkPBRPrefilterTexture() override;
125 
126  unsigned int PrefilterSize;
127  unsigned int PrefilterLevels = 5;
128  unsigned int PrefilterMaxSamples = 512;
129  vtkOpenGLTexture* InputTexture = nullptr;
130  bool ConvertToLinear = false;
131  bool HalfPrecision = true;
132 
133 private:
135  void operator=(const vtkPBRPrefilterTexture&) = delete;
136 };
137 
138 #endif
OpenGL rendering window.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract specification for renderers
Definition: vtkRenderer.h:72
void Load(vtkRenderer *) override
Implement base class method.
OpenGL texture map.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
void Render(vtkRenderer *ren) override
Implement base class method.
a simple class to control print indentation
Definition: vtkIndent.h:39
precompute prefilter texture used in physically based rendering
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this texture.
Internal class which encapsulates OpenGL FramebufferObject.
create a window for renderers to draw into
static vtkOpenGLTexture * New()