VTK  9.3.1
vtkOpenGLRenderPass.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
3 
12 #ifndef vtkOpenGLRenderPass_h
13 #define vtkOpenGLRenderPass_h
14 
15 #include "vtkRenderPass.h"
16 #include "vtkRenderingOpenGL2Module.h" // For export macro
17 
18 #include <string> // For std::string
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkAbstractMapper;
23 class vtkProp;
24 class vtkShaderProgram;
26 
27 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLRenderPass : public vtkRenderPass
28 {
29 public:
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34 
39  virtual bool PreReplaceShaderValues(std::string& vertexShader, std::string& geometryShader,
40  std::string& fragmentShader, vtkAbstractMapper* mapper, vtkProp* prop);
41  virtual bool PostReplaceShaderValues(std::string& vertexShader, std::string& geometryShader,
42  std::string& fragmentShader, vtkAbstractMapper* mapper, vtkProp* prop);
44 
49  virtual bool SetShaderParameters(vtkShaderProgram* program, vtkAbstractMapper* mapper,
50  vtkProp* prop, vtkOpenGLVertexArrayObject* VAO = nullptr);
51 
59  virtual vtkMTimeType GetShaderStageMTime();
60 
64  static vtkInformationObjectBaseVectorKey* RenderPasses();
65 
69  vtkSetMacro(ActiveDrawBuffers, unsigned int);
70  vtkGetMacro(ActiveDrawBuffers, unsigned int);
71 
72 protected:
74  ~vtkOpenGLRenderPass() override;
75 
79  void PreRender(const vtkRenderState* s);
80 
84  void PostRender(const vtkRenderState* s);
85 
86  unsigned int ActiveDrawBuffers = 0;
87 
88 private:
90  void operator=(const vtkOpenGLRenderPass&) = delete;
91 };
92 
93 VTK_ABI_NAMESPACE_END
94 #endif // vtkOpenGLRenderPass_h
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:45
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
Context in which a vtkRenderPass will render.
a simple class to control print indentation
Definition: vtkIndent.h:28
The VertexArrayObject class uses, or emulates, vertex array objects.
Key for vtkObjectBase vector values.
abstract class specifies interface to map data
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:48
Abstract render pass with shader modifications.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
The ShaderProgram uses one or more Shader objects.