16 #ifndef vtkOpenGLPolyDataMapper_h
17 #define vtkOpenGLPolyDataMapper_h
23 #include "vtkRenderingOpenGL2Module.h"
31 VTK_ABI_NAMESPACE_BEGIN
83 vtkGetMacro(PopulateSelectionSettings,
int);
106 vtkSetStringMacro(PointIdArrayName);
107 vtkGetStringMacro(PointIdArrayName);
108 vtkSetStringMacro(CellIdArrayName);
109 vtkGetStringMacro(CellIdArrayName);
118 vtkSetStringMacro(ProcessIdArrayName);
119 vtkGetStringMacro(ProcessIdArrayName);
132 vtkSetStringMacro(CompositeIdArrayName);
133 vtkGetStringMacro(CompositeIdArrayName);
157 vtkGetMacro(UseProgramPointSize,
bool);
158 vtkSetMacro(UseProgramPointSize,
bool);
159 vtkBooleanMacro(UseProgramPointSize,
bool);
184 int fieldAssociation,
int componentno = -1)
override;
192 int fieldAssociation,
int componentno = -1)
override;
217 void MapDataArray(
const char* vertexAttributeName,
const char* dataArrayName,
218 const char* texturename,
int fieldAssociation,
int componentno);
221 std::string GetTextureCoordinateName(
const char* tname);
252 virtual void BuildShaders(
258 virtual void GetShaderTemplate(
264 virtual void ReplaceShaderValues(
272 virtual void ReplaceShaderRenderPass(
273 std::map<vtkShader::Type, vtkShader*> shaders,
vtkRenderer* ren,
vtkActor* act,
bool prePass);
274 virtual void ReplaceShaderCustomUniforms(
275 std::map<vtkShader::Type, vtkShader*> shaders,
vtkActor* act);
276 virtual void ReplaceShaderColor(
278 virtual void ReplaceShaderEdges(
280 virtual void ReplaceShaderLight(
282 virtual void ReplaceShaderTCoord(
284 virtual void ReplaceShaderPicking(
286 virtual void ReplaceShaderPrimID(
288 virtual void ReplaceShaderNormal(
290 virtual void ReplaceShaderClip(
292 virtual void ReplaceShaderPositionVC(
294 virtual void ReplaceShaderCoincidentOffset(
296 virtual void ReplaceShaderDepth(
313 virtual void SetLightingShaderParameters(
324 virtual void SetPropertyShaderParameters(
350 virtual void BuildSelectionIBO(
356 virtual void BuildSelectionCache(
const char* arrayName,
bool selectingPoints,
vtkPolyData* poly);
366 bool DrawingSelection =
false;
370 std::map<std::tuple<unsigned int, unsigned int, vtkIdType>, std::vector<vtkIdType>>
373 bool SelectionCacheForPoints =
false;
381 virtual bool HaveTextures(
vtkActor* actor);
384 virtual unsigned int GetNumberOfTextures(
vtkActor* actor);
391 virtual std::vector<std::pair<vtkTexture*, std::string>> GetTextures(
vtkActor* actor);
445 virtual void BuildCellTextures(
449 std::vector<unsigned char>& colors, std::vector<float>& normals,
vtkPolyData* pd,
488 int GetOpenGLMode(
int representation,
int primType);
492 int GetPointPickingPrimitiveSize(
int primType);
503 virtual void AddPointIdsToSelectionPrimitives(
vtkPolyData* poly,
const char* arrayName,
504 unsigned int processId,
unsigned int compositeIndex,
vtkIdType selectedId);
505 virtual void AddCellIdsToSelectionPrimitives(
vtkPolyData* poly,
const char* arrayName,
506 unsigned int processId,
unsigned int compositeIndex,
vtkIdType selectedId);
515 VTK_ABI_NAMESPACE_END
abstract superclass for all actors, volumes and annotations
vtkStateStorage IBOBuildState
vtkNew< vtkInformation > LastRenderPassInfo
PolyDataMapper using OpenGL to render.
vtkMatrix3x3 * TempMatrix3
vtkStateStorage CellTextureBuildState
void ShallowCopy(vtkAbstractMapper *m) override
Make a shallow copy of this mapper.
represents an object (geometry & properties) in a rendered scene
vtkOpenGLBufferObject * CellScalarBuffer
virtual MapperHashType GenerateHash(vtkPolyData *)
This hash integer is computed by concrete graphics implementation of this class.
represent and manipulate 4x4 transformation matrices
virtual void MapDataArrayToMultiTextureAttribute(const char *textureName, const char *dataArrayName, int fieldAssociation, int componentno=-1)
virtual void RemoveAllVertexAttributeMappings()
Remove all vertex attributes.
vtkTypeUInt32 vtkMTimeType
vtkTimeStamp VBOBuildTime
record modification and/or execution time
vtkNew< vtkOpenGLCellToVTKCellMap > CellCellMap
vtkPolyData * CurrentInput
vtkTextureObject * CellScalarTexture
vtkOpenGLBufferObject * CellNormalBuffer
vtkTextureObject * CellNormalTexture
OpenGL rendering utility functions.
abstract specification for renderers
virtual void RenderPiece(vtkRenderer *, vtkActor *)
Implemented by sub classes.
bool ForceTextureCoordinates
virtual void ProcessSelectorPixelBuffers(vtkHardwareSelector *, std::vector< unsigned int > &, vtkProp *)
allows a mapper to update a selections color buffers Called from a prop which in turn is called from ...
represent GPU shader properties
std::map< std::string, ExtraAttributeValue > ExtraAttributes
concrete dataset represents vertices, lines, polygons, and triangle strips
vtkOpenGLBufferObject * EdgeBuffer
virtual void RemoveVertexAttributeMapping(const char *vertexAttributeName)
Remove a vertex attribute mapping.
bool GetSupportsSelection() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
void SetPopulateSelectionSettings(int v)
window superclass for vtkRenderWindow
int PopulateSelectionSettings
std::map< std::tuple< unsigned int, unsigned int, vtkIdType >, std::vector< vtkIdType > > SelectionCache
std::uintptr_t MapperHashType
vtkStateStorage VBOBuildState
vtkOpenGLVertexBufferObjectGroup * VBOs
a simple class to control print indentation
unsigned int TimerQueryCounter
vtkMatrix4x4 * TempMatrix4
vtkNew< vtkMatrix4x4 > VBOShiftScale
handles properties associated with a texture map
vtkOpenGLRenderTimer * TimerQuery
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ComputeBounds()
Called in GetBounds().
vtkOpenGLHelper * LastBoundBO
abstract class specifies interface to map data
abstracts an OpenGL texture object.
virtual void MapDataArrayToVertexAttribute(const char *vertexAttributeName, const char *dataArrayName, int fieldAssociation, int componentno=-1)
Select a data array from the point/cell data and map it to a generic vertex attribute.
vtkTimeStamp SelectionStateChanged
map vtkPolyData to graphics primitives
object to represent cell connectivity
vtkGenericOpenGLResourceFreeCallback * ResourceCallback
vtkNew< vtkTransform > VBOInverseTransform
std::vector< unsigned char > EdgeValues
vtkTimeStamp LightComplexityChanged
char * ProcessIdArrayName
static vtkPolyDataMapper * New()
vtkTextureObject * EdgeTexture
char * CompositeIdArrayName
represent and manipulate 3x3 transformation matrices
vtkStateStorage TempState
manage vertex buffer objects shared within a mapper
std::map< const vtkOpenGLHelper *, primitiveInfo > PrimitiveInfo
vtkOpenGLTexture * InternalColorTexture
virtual void SetVBOShiftScaleMethod(int)
A convenience method for enabling/disabling the VBO's shift+scale transform.
Asynchronously measures GPU execution time for a single event.
Class to make storing and comparing state quick and easy.
represent and manipulate 3D points
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
std::string SelectionCacheName