VTK  9.5.20250922
vtkOpenGLES30PolyDataMapper2D.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
20#ifndef vtkOpenGLES30PolyDataMapper2D_h
21#define vtkOpenGLES30PolyDataMapper2D_h
22
24
25#include "vtkOpenGLVertexBufferObjectGroup.h" // for ivar
26#include "vtkRenderingOpenGL2Module.h" // for export macro
27#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
28
29VTK_ABI_NAMESPACE_BEGIN
30
31class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkOpenGLES30PolyDataMapper2D
33{
34public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
39 // NOLINTNEXTLINE(readability-enum-initial-value)
41 {
42 PrimitiveStart = 0,
43 PrimitivePoints = 0,
47 PrimitiveEnd
48 };
49
53 void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor) override;
54
61
62protected:
65
69 void BuildShaders(std::string& VertexCode, std::string& fragmentCode, std::string& geometryCode,
70 vtkViewport* ren, vtkActor2D* act) override;
71
75 void ReplaceShaderPointSize(std::string& VSSource, vtkViewport* ren, vtkActor2D* act);
76
81 void ReplaceShaderWideLines(std::string& VSSource, vtkViewport* ren, vtkActor2D* act);
82
86 void UpdateShaders(vtkOpenGLHelper& cellBO, vtkViewport* viewport, vtkActor2D* act) override;
87
92 vtkOpenGLHelper& cellBO, vtkViewport* viewport, vtkActor2D* act) override;
93
97 void UpdateVBO(vtkActor2D* act, vtkViewport* viewport);
98
99 std::vector<unsigned int> PrimitiveIndexArrays[PrimitiveEnd];
100 vtkNew<vtkOpenGLVertexBufferObjectGroup> PrimitiveVBOGroup[PrimitiveEnd];
101 PrimitiveTypes CurrentDrawCallPrimtiveType = PrimitiveEnd;
102
103private:
105 void operator=(const vtkOpenGLES30PolyDataMapper2D&) = delete;
106};
107
108VTK_ABI_NAMESPACE_END
109#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:167
2D PolyData support for OpenGL ES 3.0
void BuildShaders(std::string &VertexCode, std::string &fragmentCode, std::string &geometryCode, vtkViewport *ren, vtkActor2D *act) override
Build the shader source code.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ReplaceShaderPointSize(std::string &VSSource, vtkViewport *ren, vtkActor2D *act)
In GLES 3.0, point size is set from the vertex shader.
void UpdateVBO(vtkActor2D *act, vtkViewport *viewport)
Update the scene when necessary.
void ReplaceShaderWideLines(std::string &VSSource, vtkViewport *ren, vtkActor2D *act)
GLES 3.0 does not support wide lines (width > 1).
void UpdateShaders(vtkOpenGLHelper &cellBO, vtkViewport *viewport, vtkActor2D *act) override
Determine what shader to use and compile/link it.
static vtkOpenGLES30PolyDataMapper2D * New()
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor) override
Actually draw the poly data.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
void SetMapperShaderParameters(vtkOpenGLHelper &cellBO, vtkViewport *viewport, vtkActor2D *act) override
Set the shader parameters related to the mapper/input data, called by UpdateShader.
~vtkOpenGLES30PolyDataMapper2D() override
2D PolyData support for OpenGL
abstract specification for Viewports
Definition vtkViewport.h:66
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
#define VTK_MARSHALAUTO