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 =========================================================================*/
35 #ifndef vtkToneMappingPass_h
36 #define vtkToneMappingPass_h
37 
38 #include "vtkImageProcessingPass.h"
39 #include "vtkRenderingOpenGL2Module.h" // For export macro
40 
43 class vtkTextureObject;
44 
45 class VTKRENDERINGOPENGL2_EXPORT vtkToneMappingPass : public vtkImageProcessingPass
46 {
47 public:
48  static vtkToneMappingPass* New();
50 
54  void Render(const vtkRenderState* s) override;
55 
59  void ReleaseGraphicsResources(vtkWindow* w) override;
60 
64  enum
65  {
66  Clamp = 0,
67  Reinhard = 1,
68  Exponential = 2
69  };
70 
72 
76  vtkSetClampMacro(ToneMappingType, int, 0, 2);
77  vtkGetMacro(ToneMappingType, int);
79 
81 
85  vtkGetMacro(Exposure, float);
86  vtkSetMacro(Exposure, float);
88 
89 protected:
90  vtkToneMappingPass() = default;
91  ~vtkToneMappingPass() override;
92 
96  vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
97  vtkTextureObject* ColorTexture = nullptr;
98  vtkOpenGLQuadHelper* QuadHelper = nullptr;
99 
100  int ToneMappingType = Clamp;
101  float Exposure = 1.0;
102 
103 private:
104  vtkToneMappingPass(const vtkToneMappingPass&) = delete;
105  void operator=(const vtkToneMappingPass&) = delete;
106 };
107 
108 #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:37
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.