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:
39  static vtkPBRPrefilterTexture* New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
47  void SetInputTexture(vtkOpenGLTexture*);
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 
109  void ReleaseGraphicsResources(vtkWindow*) override;
110 
111 protected:
112  vtkPBRPrefilterTexture() = default;
113  ~vtkPBRPrefilterTexture() override;
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
vtkPBRPrefilterTexture
precompute prefilter texture used in physically based rendering
Definition: vtkPBRPrefilterTexture.h:36
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition: vtkOpenGLFramebufferObject.h:181
vtkOpenGLTexture::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this texture.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkOpenGLTexture::New
static vtkOpenGLTexture * New()
vtkOpenGLTexture::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkOpenGLTexture::Load
void Load(vtkRenderer *) override
Implement base class method.
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:67
vtkPBRPrefilterTexture::Render
void Render(vtkRenderer *ren) override
Implement base class method.
Definition: vtkPBRPrefilterTexture.h:59
vtkOpenGLTexture.h
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:51
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:93
vtkOpenGLTexture
OpenGL texture map.
Definition: vtkOpenGLTexture.h:33