VTK  9.3.0
vtkOpenGLES30PolyDataMapper.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
13#ifndef vtkOpenGLES30PolyDataMapper_h
14#define vtkOpenGLES30PolyDataMapper_h
15
17
18#include "vtkNew.h" // for ivar
19#include "vtkRenderingOpenGL2Module.h" // For export macro
20
21#include <vector> // for ivar
22
23VTK_ABI_NAMESPACE_BEGIN
25class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLES30PolyDataMapper : public vtkOpenGLPolyDataMapper
26{
27public:
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
32 void RenderPieceStart(vtkRenderer* ren, vtkActor* act) override;
33 void RenderPieceDraw(vtkRenderer* ren, vtkActor* act) override;
34 void RenderPieceFinish(vtkRenderer* ren, vtkActor* act) override;
35
42
43protected:
46
51 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
52
54
59 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
61 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
63 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
65 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
67 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
69 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
74 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
80 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act);
82
87
92 vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act) override;
93
97 void BuildBufferObjects(vtkRenderer* ren, vtkActor* act) override;
99 vtkOpenGLCellToVTKCellMap* prim2cellMap, vtkIdType& voffset);
100
104 void UpdateMaximumPointCellIds(vtkRenderer* ren, vtkActor* actor) override;
105
110 static void BuildIndexArrays(std::vector<unsigned int> (&indexArrays)[PrimitiveEnd],
111 std::vector<unsigned char>& edgeArray, vtkCellArray* prims[4], vtkPoints* points,
112 int representation, bool draw_surf_with_edges = false, bool vertex_visibility = false,
113 vtkDataArray* ef = nullptr);
114
116 bool DrawingLines(vtkActor* actor);
117
119 std::vector<unsigned int> PrimitiveIndexArrays[PrimitiveEnd];
120
121private:
123 void operator=(const vtkOpenGLES30PolyDataMapper&) = delete;
124};
125
126VTK_ABI_NAMESPACE_END
127#endif // vtkOpenGLES30PolyDataMapper_h
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:41
object to represent cell connectivity
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:29
Allocate and hold a VTK object.
Definition vtkNew.h:51
OpenGL rendering utility functions.
PolyDataMapper using OpenGLES30 to render surface meshes.
void ReplaceShaderNormal(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act) override
Perform string replacements on the shader templates, called from ReplaceShaderValues.
static vtkOpenGLES30PolyDataMapper * New()
void ReplaceShaderWideLines(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
GLES 3.0 does not support wide lines (width > 1).
void RenderPieceDraw(vtkRenderer *ren, vtkActor *act) override
Implemented by sub classes.
void SetPropertyShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act) override
Set the shader parameters related to the property, called by UpdateShader.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
~vtkOpenGLES30PolyDataMapper() override
void UpdateMaximumPointCellIds(vtkRenderer *ren, vtkActor *actor) override
Compute and set the maximum point and cell ID used in selection.
void BuildBufferObjects(vtkRenderer *ren, vtkActor *act) override
Build the VBO, called by UpdateBufferObjects.
bool DrawingPoints(vtkActor *actor)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ReplaceShaderColor(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act) override
Perform string replacements on the shader templates, called from ReplaceShaderValues.
void ReplaceShaderPicking(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act) override
Perform string replacements on the shader templates, called from ReplaceShaderValues.
static void BuildIndexArrays(std::vector< unsigned int >(&indexArrays)[PrimitiveEnd], std::vector< unsigned char > &edgeArray, vtkCellArray *prims[4], vtkPoints *points, int representation, bool draw_surf_with_edges=false, bool vertex_visibility=false, vtkDataArray *ef=nullptr)
Get flat 0-based indices that form GL primitives for given vtk-cell connectivity and actor representa...
void SetMapperShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act) override
Set the shader parameters related to the mapper/input data, called by UpdateShader.
void ReplaceShaderCoincidentOffset(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act) override
Perform string replacements on the shader templates, called from ReplaceShaderValues.
void ReplaceShaderPointSize(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
In GLES 3.0, point size is set from the vertex shader.
void ReplaceShaderValues(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act) override
Perform string replacements on the shader templates, called from ReplaceShaderValues.
void RenderPieceFinish(vtkRenderer *ren, vtkActor *act) override
Implemented by sub classes.
void ReplaceShaderEdges(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act) override
Perform string replacements on the shader templates, called from ReplaceShaderValues.
void GetShaderTemplate(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act) override
Create the basic shaders before replacement.
bool DrawingLines(vtkActor *actor)
void RenderPieceStart(vtkRenderer *ren, vtkActor *act) override
Implemented by sub classes.
void AppendOneBufferObject(vtkRenderer *ren, vtkActor *act, vtkPolyData *polydata, vtkOpenGLCellToVTKCellMap *prim2cellMap, vtkIdType &voffset)
PolyDataMapper using OpenGL to render.
represent and manipulate 3D points
Definition vtkPoints.h:29
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:80
abstract specification for renderers
Definition vtkRenderer.h:59
window superclass for vtkRenderWindow
Definition vtkWindow.h:25
int vtkIdType
Definition vtkType.h:315