15#ifndef vtkOpenGLBatchedPolyDataMapper_h
16#define vtkOpenGLBatchedPolyDataMapper_h
21#include "vtkRenderingOpenGL2Module.h"
27#ifndef GL_ES_VERSION_3_0
29#define vtkOpenGLPolyDataMapperImplementation vtkOpenGLPolyDataMapper
32#define vtkOpenGLPolyDataMapperImplementation vtkOpenGLES30PolyDataMapper
39VTK_ABI_NAMESPACE_BEGIN
83 GLBatchElement* glBatchElement, std::vector<unsigned int>& mypixels);
96 GLenum mode,
int pointSize);
115 std::map<vtkShader::Type, vtkShader*> shaders,
vtkRenderer* renderer,
vtkActor* actor)
override;
128 std::vector<float>& norms);
148 std::vector<unsigned int> IndexArray[PrimitiveEnd];
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
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
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
void BuildBufferObjects(vtkRenderer *renderer, vtkActor *actor) override
Build the VBO/IBO, called by UpdateBufferObjects.
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
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.
#define vtkOpenGLPolyDataMapperImplementation
#define vtkOpenGLPolyDataMapperImplementation