VTK
vtkToneMappingPass.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkToneMappingPass.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 =========================================================================*/
32 #ifndef vtkToneMappingPass_h
33 #define vtkToneMappingPass_h
34 
35 #include "vtkImageProcessingPass.h"
36 #include "vtkRenderingOpenGL2Module.h" // For export macro
37 
40 class vtkTextureObject;
41 
42 class VTKRENDERINGOPENGL2_EXPORT vtkToneMappingPass : public vtkImageProcessingPass
43 {
44 public:
45  static vtkToneMappingPass* New();
47 
51  void Render(const vtkRenderState* s) override;
52 
56  void ReleaseGraphicsResources(vtkWindow* w) override;
57 
61  enum
62  {
63  Clamp = 0,
64  Reinhard = 1,
65  Exponential = 2
66  };
67 
69 
73  vtkSetClampMacro(ToneMappingType, int, 0, 2);
74  vtkGetMacro(ToneMappingType, int);
76 
78 
82  vtkGetMacro(Exposure, float);
83  vtkSetMacro(Exposure, float);
85 
86 protected:
87  vtkToneMappingPass() = default;
88  ~vtkToneMappingPass() override;
89 
93  vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
94  vtkTextureObject* ColorTexture = nullptr;
95  vtkOpenGLQuadHelper* QuadHelper = nullptr;
96 
97  int ToneMappingType = Clamp;
98  float Exposure = 1.0;
99 
100 private:
101  vtkToneMappingPass(const vtkToneMappingPass&) = delete;
102  void operator=(const vtkToneMappingPass&) = delete;
103 };
104 
105 #endif
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
Convenient class for post-processing passes.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
Context in which a vtkRenderPass will render.
Internal class which encapsulates OpenGL FramebufferObject.
abstracts an OpenGL texture object.
virtual void Render(const vtkRenderState *s)=0
Perform rendering according to a render state s.
Class to make rendering a full screen quad easier.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Implement a post-processing Tone Mapping.