18#ifndef vtkOpenGLBatchedPolyDataMapper_h
19#define vtkOpenGLBatchedPolyDataMapper_h
26#include "vtkRenderingOpenGL2Module.h"
33VTK_ABI_NAMESPACE_BEGIN
76 GLBatchElement* glBatchElement, std::vector<unsigned int>& mypixels);
94 GLenum mode,
int pointSize);
113 std::map<vtkShader::Type, vtkShader*> shaders,
vtkRenderer* renderer,
vtkActor* actor)
override;
126 std::vector<float>& norms);
represents an object (geometry & properties) in a rendered scene
a class that renders hierarchical polygonal data
general representation of visualization data
a simple class to control print indentation
An OpenGL mapper for batched rendering of vtkPolyData.
void UnmarkBatchElements()
std::vector< vtkPolyData * > GetRenderedList() const
Accessor to the ordered list of PolyData that we last drew.
void ClearBatchElements()
API to add and query a GLBatchElement instance per vtkPolyData.
std::vector< std::vector< unsigned int > > PickPixels
void ReplaceShaderColor(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *renderer, vtkActor *actor) override
Perform string replacements on the shader templates, called from ReplaceShaderValues.
vtkHardwareSelector * CurrentSelector
std::map< unsigned int, std::uintptr_t > FlatIndexToPolyData
BatchElement * GetBatchElement(vtkPolyData *polydata)
API to add and query a GLBatchElement instance per vtkPolyData.
void RenderPiece(vtkRenderer *renderer, vtkActor *actor) override
Implemented by sub classes.
void UpdateShaders(vtkOpenGLHelper &cellBO, vtkRenderer *renderer, vtkActor *actor) override
Make sure appropriate shaders are defined, compiled and bound.
void BuildSelectionIBO(vtkPolyData *poly, std::vector< unsigned int >(&indices)[4], vtkIdType offset) override
Build the selection IBOs, called by UpdateBufferObjects.
vtkOpenGLBatchedPolyDataMapper()
virtual void AppendOneBufferObject(vtkRenderer *renderer, vtkActor *actor, GLBatchElement *glBatchElement, vtkIdType &vertexOffset, std::vector< unsigned char > &colors, std::vector< float > &norms)
void RenderPieceDraw(vtkRenderer *renderer, vtkActor *actor) override
Implemented by sub classes.
void AddBatchElement(unsigned int flatIndex, BatchElement &&batchElement)
API to add and query a GLBatchElement instance per vtkPolyData.
void DrawIBO(vtkRenderer *renderer, vtkActor *actoror, int primType, vtkOpenGLHelper &CellBO, GLenum mode, int pointSize)
Draws primitives.
std::map< vtkAbstractArray *, vtkDataArray * > ColorArrayMap
int CanUseTextureMapForColoring(vtkDataObject *) override
Returns if we can use texture maps for scalar coloring.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void BuildBufferObjects(vtkRenderer *renderer, vtkActor *actor) override
Build the VBO/IBO, called by UpdateBufferObjects.
vtkMTimeType GetMTime() override
Returns the maximum of our and Parent vtkCompositePolyDataMapper's MTime.
void ClearUnmarkedBatchElements()
void ProcessSelectorPixelBuffers(vtkHardwareSelector *sel, std::vector< unsigned int > &pixeloffsets, vtkProp *prop) override
allows a mapper to update a selections color buffers Called from a prop which in turn is called from ...
static vtkOpenGLBatchedPolyDataMapper * New()
virtual void SetShaderValues(vtkShaderProgram *prog, GLBatchElement *glBatchElement, size_t primOffset)
Applies rendering attributes for the corresponding polydata in the glBatchElement.
~vtkOpenGLBatchedPolyDataMapper() override
void UpdateCameraShiftScale(vtkRenderer *renderer, vtkActor *actoror) override
virtual void ProcessCompositePixelBuffers(vtkHardwareSelector *sel, vtkProp *prop, GLBatchElement *glBatchElement, std::vector< unsigned int > &mypixels)
std::map< std::uintptr_t, std::unique_ptr< GLBatchElement > > VTKPolyDataToGLBatchElement
bool GetNeedToRebuildBufferObjects(vtkRenderer *renderer, vtkActor *actor) override
Does the VBO/IBO need to be rebuilt.
void SetParent(vtkCompositePolyDataMapper *parent)
vtkCompositePolyDataMapperDelegator::BatchElement BatchElement
PolyDataMapper using OpenGL to render.
concrete dataset represents vertices, lines, polygons, and triangle strips
abstract superclass for all actors, volumes and annotations
abstract specification for renderers
The ShaderProgram uses one or more Shader objects.
vtkTypeUInt32 vtkMTimeType