15 #ifndef vtkDrawTexturedElements_h
16 #define vtkDrawTexturedElements_h
18 #include "vtkRenderingOpenGL2Module.h"
28 #include <unordered_map>
30 VTK_ABI_NAMESPACE_BEGIN
34 class vtkGLSLRuntimeModBase;
83 void AppendArrayToTexture(
96 void BeginArrayRebuild();
100 virtual bool SetNumberOfInstances(
vtkIdType numberOfInstances);
113 virtual bool SetElementType(
int elementType);
123 virtual bool SetPatchType(
int patchType);
132 virtual bool SetIncludeColormap(
bool includeColormap);
168 void ClearElementIndexBuffer();
169 bool GetUsesIndexBuffer()
const;
178 void SetIndexedDrawEnabled(
bool enabled);
182 void ReleaseResources(
vtkWindow* window);
191 static vtkIdType PatchVertexCountFromPrimitive(
int element);
197 void ReportUnsupportedLineWidth(
float width,
float maxWidth,
vtkMapper* mapper);
202 using ShaderMap = std::map<vtkShader::Type, vtkShader*>;
206 Internal* P{
nullptr };
211 int PatchType{ PatchShape::PatchTriangle };
212 bool IncludeColormap{
true };
213 std::unordered_map<vtkStringToken, vtkOpenGLArrayTextureBufferAdapter>
Arrays;
221 bool ShaderProgramBuilt{
false };
231 VTK_ABI_NAMESPACE_END
233 #endif // vtkDrawTexturedElements_h
ElementShape
The type of primitive to output.
Input to the essellation control shader is a quadrilateral.
Send triangles to the shader (moving window of 3 vertices).
vtkNew< vtkOpenGLTexture > ColorTextureGL
Send line segments to the shader.
represents an object (geometry & properties) in a rendered scene
represent and manipulate 4x4 transformation matrices
bool GetIncludeColormap()
Send triangles to the shader.
Type
Available shader types.
Input to the essellation control shader is a line segment.
abstract specification for renderers
Superclass for mapping scalar values to colors.
window superclass for vtkRenderWindow
Input to the essellation control shader is a triangle.
static const unsigned int numberOfElements
Send triangle fans to the shader (first vertex is constant).
vtkIdType GetNumberOfElements()
Set/get the number of elements (primitives) to draw per instance.
The VertexArrayObject class uses, or emulates, vertex array objects.
vtkNew< vtkOpenGLVertexArrayObject > VAO
abstract superclass for arrays of numeric data
std::unordered_map< vtkStringToken, vtkOpenGLArrayTextureBufferAdapter > Arrays
Represent a string by its integer hash.
abstract class specifies interface to map data to graphics primitives
std::map< vtkShader::Type, vtkShader * > ShaderMap
PatchShape
The type of primitive that abstract patches are tessellated into.
abstracts an OpenGL texture object.
vtkSmartPointer< vtkShaderProgram > ShaderProgram
A base class for mappers or render responders that need to draw primitives via vertex-pulling.
Vertex or Fragment shader, combined into a ShaderProgram.
create and manipulate ordered lists of objects
vtkNew< vtkCollection > GLSLMods
Send line segments to the shader.
represent and manipulate 3x3 transformation matrices
Send points to the shader.
vtkIdType GetNumberOfInstances()
Set/get the number of element instances to draw.
The ShaderProgram uses one or more Shader objects.