VTK  9.1.0
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
34class vtkProp;
37
38class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLRenderPass : public vtkRenderPass
39{
40public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
45
50 virtual bool PreReplaceShaderValues(std::string& vertexShader, std::string& geometryShader,
51 std::string& fragmentShader, vtkAbstractMapper* mapper, vtkProp* prop);
52 virtual bool PostReplaceShaderValues(std::string& vertexShader, std::string& geometryShader,
53 std::string& fragmentShader, vtkAbstractMapper* mapper, vtkProp* prop);
55
61 vtkProp* prop, vtkOpenGLVertexArrayObject* VAO = nullptr);
62
71
76
80 vtkSetMacro(ActiveDrawBuffers, unsigned int);
81 vtkGetMacro(ActiveDrawBuffers, unsigned int);
82
83protected:
86
90 void PreRender(const vtkRenderState* s);
91
95 void PostRender(const vtkRenderState* s);
96
97 unsigned int ActiveDrawBuffers = 0;
98
99private:
101 void operator=(const vtkOpenGLRenderPass&) = delete;
102};
103
104#endif // vtkOpenGLRenderPass_h
abstract class specifies interface to map data
a simple class to control print indentation
Definition: vtkIndent.h:113
Key for vtkObjectBase vector values.
Abstract render pass with shader modifications.
virtual bool PostReplaceShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop)
Use vtkShaderProgram::Substitute to replace.
void PostRender(const vtkRenderState *s)
Call after rendering to clean up the actors' information keys.
void PreRender(const vtkRenderState *s)
Call before rendering to update the actors' information keys.
virtual bool SetShaderParameters(vtkShaderProgram *program, vtkAbstractMapper *mapper, vtkProp *prop, vtkOpenGLVertexArrayObject *VAO=nullptr)
Update the uniforms of the shader program.
virtual bool PreReplaceShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop)
Use vtkShaderProgram::Substitute to replace.
static vtkInformationObjectBaseVectorKey * RenderPasses()
Key containing information about the current pass.
~vtkOpenGLRenderPass() override
virtual vtkMTimeType GetShaderStageMTime()
For multi-stage render passes that need to change shader code during a single pass,...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
The VertexArrayObject class uses, or emulates, vertex array objects.
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:76
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:57
Context in which a vtkRenderPass will render.
The ShaderProgram uses one or more Shader objects.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287