VTK  9.0.1
vtkOpenGLRenderPass.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLRenderPass.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 =========================================================================*/
15 
24 #ifndef vtkOpenGLRenderPass_h
25 #define vtkOpenGLRenderPass_h
26 
27 #include "vtkRenderPass.h"
28 #include "vtkRenderingOpenGL2Module.h" // For export macro
29 
30 #include <string> // For std::string
31 
32 class vtkAbstractMapper;
34 class vtkProp;
35 class vtkShaderProgram;
37 
38 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLRenderPass : public vtkRenderPass
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
49  virtual bool PreReplaceShaderValues(std::string& vertexShader, std::string& geometryShader,
50  std::string& fragmentShader, vtkAbstractMapper* mapper, vtkProp* prop);
51 
57  virtual bool PostReplaceShaderValues(std::string& vertexShader, std::string& geometryShader,
58  std::string& fragmentShader, vtkAbstractMapper* mapper, vtkProp* prop);
59 
64  virtual bool SetShaderParameters(vtkShaderProgram* program, vtkAbstractMapper* mapper,
65  vtkProp* prop, vtkOpenGLVertexArrayObject* VAO = nullptr);
66 
74  virtual vtkMTimeType GetShaderStageMTime();
75 
79  static vtkInformationObjectBaseVectorKey* RenderPasses();
80 
84  vtkSetMacro(ActiveDrawBuffers, unsigned int);
85  vtkGetMacro(ActiveDrawBuffers, unsigned int);
86 
87 protected:
89  ~vtkOpenGLRenderPass() override;
90 
94  void PreRender(const vtkRenderState* s);
95 
99  void PostRender(const vtkRenderState* s);
100 
101  unsigned int ActiveDrawBuffers = 0;
102 
103 private:
104  vtkOpenGLRenderPass(const vtkOpenGLRenderPass&) = delete;
105  void operator=(const vtkOpenGLRenderPass&) = delete;
106 };
107 
108 #endif // vtkOpenGLRenderPass_h
vtkRenderPass.h
vtkRenderPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkShaderProgram
The ShaderProgram uses one or more Shader objects.
Definition: vtkShaderProgram.h:44
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInformationObjectBaseVectorKey
Key for vtkObjectBase vector values.
Definition: vtkInformationObjectBaseVectorKey.h:34
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:53
vtkX3D::string
@ string
Definition: vtkX3D.h:496
vtkOpenGLRenderPass
Abstract render pass with shader modifications.
Definition: vtkOpenGLRenderPass.h:38
vtkRenderState
Context in which a vtkRenderPass will render.
Definition: vtkRenderState.h:40
vtkOpenGLVertexArrayObject
The VertexArrayObject class uses, or emulates, vertex array objects.
Definition: vtkOpenGLVertexArrayObject.h:36
vtkAbstractMapper
abstract class specifies interface to map data
Definition: vtkAbstractMapper.h:52
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkRenderPass
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:56