17#ifndef vtkOpenGLLowMemoryPolyDataMapper_h
18#define vtkOpenGLLowMemoryPolyDataMapper_h
26#include "vtkRenderingOpenGL2Module.h"
36VTK_ABI_NAMESPACE_BEGIN
118 void AddMod(
const std::string& className);
119 void AddMods(
const std::vector<std::string>& classNames);
135 int fieldAssociation,
int componentno = -1)
override;
143 int fieldAssociation,
int componentno = -1)
override;
192 void MapDataArray(
const char* vertexAttributeName,
const char* dataArrayName,
193 const char* texturename,
int fieldAssociation,
int componentno);
320 std::unique_ptr<vtkOpenGLLowMemoryCellTypeAgent>
Agent;
363 int numberOfPseudoPrimitivesPerElement,
bool inVertexVisibilityPass)
const;
423#define vtkOpenGLLowMemoryPolyDataMapper_OVERRIDE_ATTRIBUTES \
424 vtkOpenGLLowMemoryPolyDataMapper::CreateOverrideAttributes()
abstract class specifies interface to map data
represents an object (geometry & properties) in a rendered scene
vtkDrawTexturedElements()
a simple class to control print indentation
Allocate and hold a VTK object.
Helps vtkOpenGLLowMemoryPolyDataMapper map and draw cell types from vtkPolyData as OpenGL graphics pr...
Maps VTK_LINE and VTK_POLY_LINE into GL_LINES and draws GL_LINES or GL_POINTS.
void InstallArrayTextureShaderDeclarations()
virtual void RenderPieceFinish(vtkRenderer *renderer, vtkActor *actor)
vtkOpenGLShaderDeclaration::GLSLDataType GLSLDataType
void AddMods(const std::vector< std::string > &classNames)
void ReplaceShaderSelection(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
friend class vtkOpenGLLowMemoryPolygonsAgent
Resolve UniformLocs against the current ShaderProgram if it changed or was relinked since the last ca...
vtkTimeStamp RenderTimeStamp
bool HaveTextures(vtkActor *actor)
void RemoveMod(const std::string &className)
void ReplaceShaderImplementationCustomUniforms(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
std::vector< vtkOpenGLShaderDeclaration > ShaderDecls
bool PopulateSelectionSettings
bool UsesRotationMap
Decide whether a particular cell-group draw may use the indexed (glDrawElementsInstanced) fast path.
virtual bool IsShaderColorSourceUpToDate(vtkActor *actor)
virtual void UpdateShiftScale(vtkRenderer *renderer, vtkActor *actor)
void SetShaderParameters(vtkRenderer *renderer, vtkActor *actor)
void DeleteTextureBuffers()
bool UsesNormalMap
Decide whether a particular cell-group draw may use the indexed (glDrawElementsInstanced) fast path.
vtkNew< vtkTransform > SSInverseTransform
bool DrawingVertices
Hybrid surface/expansion dispatch switch. See the public accessors.
void ReplaceShaderEdges(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
int GetCoordShiftAndScaleMethod()
vtkPolyData * CurrentInput
bool HasCellNormals
Hybrid surface/expansion dispatch switch. See the public accessors.
void ReplaceShaderClip(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
unsigned int CachedLocLinkCount
Resolve UniformLocs against the current ShaderProgram if it changed or was relinked since the last ca...
std::pair< vtkTexture *, std::string > TextureInfo
void SetShiftValues(double x, double y, double z)
bool HasTangents
Hybrid surface/expansion dispatch switch. See the public accessors.
ShaderColorSourceAttribute DetermineShaderColorSource(vtkPolyData *mesh)
bool ForceTextureCoordinates
Hybrid surface/expansion dispatch switch. See the public accessors.
void ReplaceShaderValues(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
void ReplaceShaderNormal(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
vtkOpenGLShaderDeclaration::GLSLPrecisionType GLSLPrecisionType
virtual void ReplaceShaderColor(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
virtual void UpdateShaders(vtkRenderer *renderer, vtkActor *actor)
std::array< double, 3 > ShiftValues
void SetVBOShiftScaleMethod(int method) override
A convenience method for enabling/disabling the VBO's shift+scale transform.
virtual void RenderPieceDraw(vtkRenderer *renderer, vtkActor *actor)
bool ShouldUseIndexedRendering(vtkRenderer *renderer, vtkActor *actor, const CellGroupInformation &cellGroup, int numberOfPointsPerPrimitive, int numberOfPseudoPrimitivesPerElement, bool inVertexVisibilityPass) const
Decide whether a particular cell-group draw may use the indexed (glDrawElementsInstanced) fast path.
void ReplaceShaderTCoord(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
void UpdateUniformLocations()
Resolve UniformLocs against the current ShaderProgram if it changed or was relinked since the last ca...
bool GetCoordShiftAndScaleEnabled()
vtkDataArray * GetColorTextureCoordinates(vtkPolyData *mesh)
bool IsShaderUpToDate(vtkRenderer *renderer, vtkActor *actor)
virtual bool BindArraysToTextureBuffers(vtkRenderer *renderer, vtkActor *actor, vtkCellGraphicsPrimitiveMap::CellTypeMapperOffsets &offsets)
void RemoveAllVertexAttributeMappings() override
Remove all vertex attributes.
void ReplaceShaderPosition(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
std::map< std::string, ExtraAttributeValue > ExtraAttributes
bool UseIndexedRendering
Hybrid surface/expansion dispatch switch. See the public accessors.
vtkTimeStamp ShaderBuildTimeStamp
bool IsUpToDate(vtkRenderer *renderer, vtkActor *actor)
std::vector< std::string > ModNames
void ReplaceShaderWideLines(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
virtual vtkDataArray * GetColors(vtkPolyData *mesh)
std::array< PrimitiveInformation, 4 > Primitives
Hybrid surface/expansion dispatch switch. See the public accessors.
static vtkOpenGLLowMemoryPolyDataMapper * New()
void SetScaleValues(double x, double y, double z)
vtkOpenGLTexture * InternalColorTexture
bool HasPointNormals
Hybrid surface/expansion dispatch switch. See the public accessors.
void ComputeCameraBasedShiftScale(vtkRenderer *renderer, vtkActor *actor, vtkPolyData *mesh)
ShaderNormalSourceAttribute ShaderNormalSource
bool HasColors
Hybrid surface/expansion dispatch switch. See the public accessors.
void RenderPiece(vtkRenderer *renderer, vtkActor *actor) override
Implemented by sub classes.
void MapDataArrayToVertexAttribute(const char *vertexAttributeName, const char *dataArrayName, int fieldAssociation, int componentno=-1) override
Select a data array from the point/cell data and map it to a generic vertex attribute.
vtkOpenGLShaderDeclaration::GLSLAttributeType GLSLAttributeType
void ComputeShiftScale(vtkRenderer *renderer, vtkActor *actor, vtkDataArray *arrays)
virtual bool IsDataObjectUpToDate()
vtkDataArray * GetTextureCoordinates(vtkPolyData *mesh)
void UpdateGLSLMods(vtkRenderer *renderer, vtkActor *actor)
vtkDataArray * GetPointTangents(vtkPolyData *mesh)
vtkTimeStamp PBRStateTimeStamp
Decide whether a particular cell-group draw may use the indexed (glDrawElementsInstanced) fast path.
virtual bool IsShaderNormalSourceUpToDate(vtkActor *actor)
vtkIdType GetMaximumNumberOfTriangles(vtkRenderer *ren) override
Returns the maximum number of triangles renderable based on OpenGL limits.
void UpdatePBRStateCache(vtkRenderer *renderer, vtkActor *actor)
ShaderNormalSourceAttribute DetermineShaderNormalSource(vtkActor *actor, vtkPolyData *mesh)
bool HasAnisotropy
Decide whether a particular cell-group draw may use the indexed (glDrawElementsInstanced) fast path.
bool CoordinateShiftAndScaleInUse
void ShallowCopy(vtkAbstractMapper *m) override
Make a shallow copy of this mapper.
void MapDataArrayToMultiTextureAttribute(const char *tname, const char *dataArrayName, int fieldAssociation, int componentno=-1) override
vtkTimeStamp SelectionStateTimeStamp
void ReplaceShaderPointSize(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
void UpdateMaximumPointCellIds(vtkRenderer *ren, vtkActor *actor)
friend class vtkOpenGLLowMemoryCellTypeAgent
Resolve UniformLocs against the current ShaderProgram if it changed or was relinked since the last ca...
std::pair< std::string, std::string > GetTextureCoordinateAndSamplerBufferNames(const char *tname)
vtkNew< vtkInformation > LastRenderPassInfo
ShaderColorSourceAttribute ShaderColorSource
std::set< std::string > ModNamesUnique
~vtkOpenGLLowMemoryPolyDataMapper() override
std::array< double, 3 > ScaleValues
vtkWeakPtr< vtkShaderProgram > CachedLocProgram
Resolve UniformLocs against the current ShaderProgram if it changed or was relinked since the last ca...
vtkDataArray * GetCellNormals(vtkPolyData *mesh)
ShaderColorSourceAttribute
friend class vtkOpenGLLowMemoryVerticesAgent
Resolve UniformLocs against the current ShaderProgram if it changed or was relinked since the last ca...
vtkNew< vtkMatrix4x4 > SSMatrix
void RemoveVertexAttributeMapping(const char *vertexAttributeName) override
Remove a vertex attribute mapping.
static vtkOverrideAttribute * CreateOverrideAttributes()
friend class vtkOpenGLLowMemoryLinesAgent
Resolve UniformLocs against the current ShaderProgram if it changed or was relinked since the last ca...
void SetPopulateSelectionSettings(bool v)
ShaderNormalSourceAttribute
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 ...
virtual void RenderPieceStart(vtkRenderer *renderer, vtkActor *actor)
bool GetSupportsSelection() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkOpenGLShaderDeclaration::GLSLQualifierType GLSLQualifierType
void ComputeShiftScaleTransform(vtkRenderer *renderer, vtkActor *actor)
unsigned int GetNumberOfTextures(vtkActor *actor)
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources associated with the window.
vtkOpenGLLowMemoryPolyDataMapper()
void MapDataArray(const char *vertexAttributeName, const char *dataArrayName, const char *texturename, int fieldAssociation, int componentno)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void AddMod(const std::string &className)
bool HasClearCoat
Decide whether a particular cell-group draw may use the indexed (glDrawElementsInstanced) fast path.
vtkTimeStamp ShiftScaleTimeStamp
bool HasPointTextureCoordinates
Hybrid surface/expansion dispatch switch. See the public accessors.
virtual std::vector< TextureInfo > GetTextures(vtkActor *actor)
vtkDataArray * GetPointNormals(vtkPolyData *mesh)
virtual void ResetModsToDefault()
If you removed all mods, call this to go back to default setting.
bool UsesCoatNormalMap
Decide whether a particular cell-group draw may use the indexed (glDrawElementsInstanced) fast path.
static std::vector< std::string > DefaultModNames
MapperHashType GenerateHash(vtkPolyData *polydata) override
Unique hash based on availability of scalars, normals, tcoords, lookup tables and related attributes ...
Maps VTK_TRIANGLE and VTK_POLYGON into GL_TRIANGLES and draws GL_TRIANGLES or GL_LINES or GL_POINTS.
Maps VTK_VERTEX and VTK_POLY_VERTEX into GL_POINTS and draws GL_POINTS.
Attribute for vtkObjectFactory overrides.
std::uintptr_t MapperHashType
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.
record modification and/or execution time
a weak reference to a vtkObjectBase.
window superclass for vtkRenderWindow
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
#define VTK_MARSHALEXCLUDE(reason)