VTK  9.7.1
vtkPBRIrradianceTexture.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
15 #ifndef vtkPBRIrradianceTexture_h
16 #define vtkPBRIrradianceTexture_h
17 
18 #include "vtkOpenGLTexture.h"
19 #include "vtkRenderingOpenGL2Module.h" // For export macro
20 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
21 
22 VTK_ABI_NAMESPACE_BEGIN
25 class vtkOpenGLTexture;
26 class vtkRenderWindow;
27 
28 class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkPBRIrradianceTexture : public vtkOpenGLTexture
29 {
30 public:
31  static vtkPBRIrradianceTexture* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
39  void SetInputTexture(vtkOpenGLTexture* texture);
40  vtkGetObjectMacro(InputTexture, vtkOpenGLTexture);
42 
46  void Load(vtkRenderer*) override;
47 
51  void Render(vtkRenderer* ren) override { this->Load(ren); }
52 
54 
58  vtkGetMacro(IrradianceSize, unsigned int);
59  vtkSetMacro(IrradianceSize, unsigned int);
61 
63 
69  vtkGetMacro(IrradianceStep, float);
70  vtkSetMacro(IrradianceStep, float);
72 
74 
79  vtkGetMacro(ConvertToLinear, bool);
80  vtkSetMacro(ConvertToLinear, bool);
81  vtkBooleanMacro(ConvertToLinear, bool);
83 
90  void ReleaseGraphicsResources(vtkWindow*) override;
91 
92 protected:
93  vtkPBRIrradianceTexture() = default;
94  ~vtkPBRIrradianceTexture() override;
95 
96  float IrradianceStep = 0.04908738521; // pi / 64
97  unsigned int IrradianceSize = 256;
98  vtkOpenGLTexture* InputTexture = nullptr;
99  bool ConvertToLinear = false;
100 
101 private:
103  void operator=(const vtkPBRIrradianceTexture&) = delete;
104 };
105 
106 VTK_ABI_NAMESPACE_END
107 #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:63
void Load(vtkRenderer *) override
Implement base class method.
OpenGL texture map.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
a simple class to control print indentation
Definition: vtkIndent.h:28
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
void Render(vtkRenderer *ren) override
Implement base class method.
#define VTK_MARSHALAUTO
static vtkOpenGLTexture * New()
precompute irradiance texture used in physically based rendering