VTK  9.1.0
vtkPBRIrradianceTexture.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPBRIrradianceTexture.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 =========================================================================*/
24 #ifndef vtkPBRIrradianceTexture_h
25 #define vtkPBRIrradianceTexture_h
26 
27 #include "vtkOpenGLTexture.h"
28 #include "vtkRenderingOpenGL2Module.h" // For export macro
29 
32 class vtkOpenGLTexture;
33 class vtkRenderWindow;
34 
35 class VTKRENDERINGOPENGL2_EXPORT vtkPBRIrradianceTexture : public vtkOpenGLTexture
36 {
37 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
47  vtkGetObjectMacro(InputTexture, vtkOpenGLTexture);
49 
53  void Load(vtkRenderer*) override;
54 
58  void Render(vtkRenderer* ren) override { this->Load(ren); }
59 
61 
65  vtkGetMacro(IrradianceSize, unsigned int);
66  vtkSetMacro(IrradianceSize, unsigned int);
68 
70 
76  vtkGetMacro(IrradianceStep, float);
77  vtkSetMacro(IrradianceStep, float);
79 
81 
86  vtkGetMacro(ConvertToLinear, bool);
87  vtkSetMacro(ConvertToLinear, bool);
88  vtkBooleanMacro(ConvertToLinear, bool);
90 
98 
99 protected:
102 
103  float IrradianceStep = 0.04908738521; // pi / 64
104  unsigned int IrradianceSize = 256;
105  vtkOpenGLTexture* InputTexture = nullptr;
106  bool ConvertToLinear = false;
107 
108 private:
110  void operator=(const vtkPBRIrradianceTexture&) = delete;
111 };
112 
113 #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 irradiance texture used in physically based rendering
void Render(vtkRenderer *ren) override
Implement base class method.
static vtkPBRIrradianceTexture * New()
vtkPBRIrradianceTexture()=default
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this texture.
void Load(vtkRenderer *) override
Implement base class method.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkPBRIrradianceTexture() override
void SetInputTexture(vtkOpenGLTexture *texture)
Get/Set the input texture.
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:73
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39