VTK  9.0.1
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 
33 class vtkOpenGLTexture;
34 class vtkRenderWindow;
35 
36 class VTKRENDERINGOPENGL2_EXPORT vtkPBRPrefilterTexture : public vtkOpenGLTexture
37 {
38 public:
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 
68  vtkGetMacro(PrefilterSize, unsigned int);
69  vtkSetMacro(PrefilterSize, unsigned int);
71 
73 
79  vtkGetMacro(PrefilterSamples, unsigned int);
80  vtkSetMacro(PrefilterSamples, unsigned int);
82 
84 
88  vtkGetMacro(PrefilterLevels, unsigned int);
89  vtkSetMacro(PrefilterLevels, unsigned int);
91 
93 
98  vtkGetMacro(ConvertToLinear, bool);
99  vtkSetMacro(ConvertToLinear, bool);
100  vtkBooleanMacro(ConvertToLinear, bool);
102 
110 
111 protected:
114 
115  unsigned int PrefilterSize = 128;
116  unsigned int PrefilterLevels = 5;
117  unsigned int PrefilterSamples = 1024;
118  vtkOpenGLTexture* InputTexture = nullptr;
119  bool ConvertToLinear = false;
120 
121 private:
123  void operator=(const vtkPBRPrefilterTexture&) = delete;
124 };
125 
126 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
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:59
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35