27 #ifndef vtkOpenGLPolyDataMapper_h
28 #define vtkOpenGLPolyDataMapper_h
34 #include "vtkRenderingOpenGL2Module.h"
86 vtkGetMacro(PopulateSelectionSettings,
int);
109 vtkSetStringMacro(PointIdArrayName);
110 vtkGetStringMacro(PointIdArrayName);
111 vtkSetStringMacro(CellIdArrayName);
112 vtkGetStringMacro(CellIdArrayName);
121 vtkSetStringMacro(ProcessIdArrayName);
122 vtkGetStringMacro(ProcessIdArrayName);
135 vtkSetStringMacro(CompositeIdArrayName);
136 vtkGetStringMacro(CompositeIdArrayName);
150 virtual void SetVBOShiftScaleMethod(
int m);
168 vtkGetMacro(PauseShiftScale,
bool);
169 vtkBooleanMacro(PauseShiftScale,
bool);
194 int fieldAssociation,
int componentno = -1)
override;
202 int fieldAssociation,
int componentno = -1)
override;
227 void MapDataArray(
const char* vertexAttributeName,
const char* dataArrayName,
228 const char* texturename,
int fieldAssociation,
int componentno);
231 std::string GetTextureCoordinateName(
const char* tname);
262 virtual void BuildShaders(
268 virtual void GetShaderTemplate(
274 virtual void ReplaceShaderValues(
282 virtual void ReplaceShaderRenderPass(
283 std::map<vtkShader::Type, vtkShader*> shaders,
vtkRenderer* ren,
vtkActor* act,
bool prePass);
284 virtual void ReplaceShaderCustomUniforms(
285 std::map<vtkShader::Type, vtkShader*> shaders,
vtkActor* act);
286 virtual void ReplaceShaderColor(
288 virtual void ReplaceShaderEdges(
290 virtual void ReplaceShaderLight(
292 virtual void ReplaceShaderTCoord(
294 virtual void ReplaceShaderPicking(
296 virtual void ReplaceShaderPrimID(
298 virtual void ReplaceShaderNormal(
300 virtual void ReplaceShaderClip(
302 virtual void ReplaceShaderPositionVC(
304 virtual void ReplaceShaderCoincidentOffset(
306 virtual void ReplaceShaderDepth(
323 virtual void SetLightingShaderParameters(
334 virtual void SetPropertyShaderParameters(
360 virtual void BuildSelectionIBO(
366 virtual void BuildSelectionCache(
const char* arrayName,
bool selectingPoints,
vtkPolyData* poly);
376 bool DrawingSelection =
false;
380 std::map<std::tuple<unsigned int, unsigned int, vtkIdType>, std::vector<vtkIdType>>
383 bool SelectionCacheForPoints =
false;
391 virtual bool HaveTextures(
vtkActor* actor);
394 virtual unsigned int GetNumberOfTextures(
vtkActor* actor);
401 virtual std::vector<std::pair<vtkTexture*, std::string>> GetTextures(
vtkActor* actor);
456 virtual void BuildCellTextures(
460 std::vector<unsigned char>& colors, std::vector<float>& normals,
vtkPolyData* pd,
499 int GetOpenGLMode(
int representation,
int primType);
503 int GetPointPickingPrimitiveSize(
int primType);
514 virtual void AddPointIdsToSelectionPrimitives(
vtkPolyData* poly,
const char* arrayName,
515 unsigned int processId,
unsigned int compositeIndex,
vtkIdType selectedId);
516 virtual void AddCellIdsToSelectionPrimitives(
vtkPolyData* poly,
const char* arrayName,
517 unsigned int processId,
unsigned int compositeIndex,
vtkIdType selectedId);
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
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)
virtual int GetVBOShiftScaleMethod()
window superclass for vtkRenderWindow
int PopulateSelectionSettings
std::map< std::tuple< unsigned int, unsigned int, vtkIdType >, std::vector< vtkIdType > > SelectionCache
vtkStateStorage VBOBuildState
vtkOpenGLVertexBufferObjectGroup * VBOs
a simple class to control print indentation
unsigned int TimerQueryCounter
vtkMatrix4x4 * TempMatrix4
virtual void SetPauseShiftScale(bool pauseShiftScale)
Pause per-render updates to VBO shift+scale parameters.
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
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