VTK  9.7.20261203
vtkOpenGLImageProcessingPass.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
17
18#ifndef vtkOpenGLImageProcessingPass_h
19#define vtkOpenGLImageProcessingPass_h
20
22#include "vtkRenderingOpenGL2Module.h" // For export macro
23#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
24
25#include <string> // For std::string
26
27VTK_ABI_NAMESPACE_BEGIN
31class vtkProp;
34
35class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkOpenGLImageProcessingPass
37{
38public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
43
47 virtual bool PreReplaceShaderValues(std::string& vertexShader, std::string& geometryShader,
48 std::string& fragmentShader, vtkAbstractMapper* mapper, vtkProp* prop);
49 virtual bool PostReplaceShaderValues(std::string& vertexShader, std::string& geometryShader,
50 std::string& fragmentShader, vtkAbstractMapper* mapper, vtkProp* prop);
52 vtkProp* prop, vtkOpenGLVertexArrayObject* VAO = nullptr);
55
57
60 void SetActiveDrawBuffers(unsigned int count);
61 unsigned int GetActiveDrawBuffers();
63
64protected:
67
77 void RenderDelegate(const vtkRenderState* s, int width, int height, int newWidth, int newHeight,
79
86 vtkTextureObject* textureTarget, const vtkRenderState* states);
87
89
95 void PreRender(const vtkRenderState* s);
96 virtual void PreRenderProp(vtkProp* prop);
97 void PostRender(const vtkRenderState* s);
98 virtual void PostRenderProp(vtkProp* prop);
100
101private:
103 void operator=(const vtkOpenGLImageProcessingPass&) = delete;
104
105 class vtkShaderHooks;
106 vtkShaderHooks* ShaderHooks;
107};
108
109VTK_ABI_NAMESPACE_END
110#endif
int count
Definition PyrGnBasis.h:1
abstract class specifies interface to map data
vtkImageProcessingPass()=default
Default constructor.
a simple class to control print indentation
Definition vtkIndent.h:108
Internal class which encapsulates OpenGL FramebufferObject.
virtual void PreRenderProp(vtkProp *prop)
Register this pass with the props of the render state so that their mappers call its shader hooks,...
void PostRender(const vtkRenderState *s)
Register this pass with the props of the render state so that their mappers call its shader hooks,...
void SetActiveDrawBuffers(unsigned int count)
Number of active draw buffers, as in vtkOpenGLRenderPass.
virtual vtkMTimeType GetShaderStageMTime()
Shader hooks, as in vtkOpenGLRenderPass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual bool SetShaderParameters(vtkShaderProgram *program, vtkAbstractMapper *mapper, vtkProp *prop, vtkOpenGLVertexArrayObject *VAO=nullptr)
Shader hooks, as in vtkOpenGLRenderPass.
virtual void PostRenderProp(vtkProp *prop)
Register this pass with the props of the render state so that their mappers call its shader hooks,...
virtual bool PreReplaceShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop)
Shader hooks, as in vtkOpenGLRenderPass.
void PreRender(const vtkRenderState *s)
Register this pass with the props of the render state so that their mappers call its shader hooks,...
virtual bool PostReplaceShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop)
Shader hooks, as in vtkOpenGLRenderPass.
~vtkOpenGLImageProcessingPass() override
unsigned int GetActiveDrawBuffers()
Number of active draw buffers, as in vtkOpenGLRenderPass.
virtual void InitializeRenderTarget(vtkTextureObject *textureTarget, const vtkRenderState *states)
Function called by RenderDelegate to prepare the color target before rendering.
void RenderDelegate(const vtkRenderState *s, int width, int height, int newWidth, int newHeight, vtkOpenGLFramebufferObject *fbo, vtkTextureObject *target)
Render delegate with a image of different dimensions than the original one.
The VertexArrayObject class uses, or emulates, vertex array objects.
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:68
Context in which a vtkRenderPass will render.
The ShaderProgram uses one or more Shader objects.
abstracts an OpenGL texture object.
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:321
#define VTK_MARSHALAUTO