17 #ifndef vtkOpenGLLowMemoryPolyDataMapper_h
18 #define vtkOpenGLLowMemoryPolyDataMapper_h
26 #include "vtkRenderingOpenGL2Module.h"
36 VTK_ABI_NAMESPACE_BEGIN
86 vtkGetMacro(PopulateSelectionSettings,
bool);
88 void SetPopulateSelectionSettings(
bool v) { this->PopulateSelectionSettings = v; }
111 vtkSetMacro(UseIndexedRendering,
bool);
112 vtkGetMacro(UseIndexedRendering,
bool);
113 vtkBooleanMacro(UseIndexedRendering,
bool);
117 virtual void ResetModsToDefault();
119 void AddMods(
const std::vector<std::string>& classNames);
121 void RemoveAllMods();
135 int fieldAssociation,
int componentno = -1)
override;
143 int fieldAssociation,
int componentno = -1)
override;
189 ShaderColorSourceAttribute DetermineShaderColorSource(
vtkPolyData* mesh);
190 ShaderNormalSourceAttribute DetermineShaderNormalSource(
vtkActor* actor,
vtkPolyData* mesh);
192 void MapDataArray(
const char* vertexAttributeName,
const char* dataArrayName,
193 const char* texturename,
int fieldAssociation,
int componentno);
196 virtual bool IsDataObjectUpToDate();
197 virtual bool IsShaderColorSourceUpToDate(
vtkActor* actor);
198 virtual bool IsShaderNormalSourceUpToDate(
vtkActor* actor);
199 void DeleteTextureBuffers();
202 void InstallArrayTextureShaderDeclarations();
204 void ReplaceShaderValues(
206 void ReplaceShaderPosition(
208 void ReplaceShaderNormal(
210 virtual void ReplaceShaderColor(
212 void ReplaceShaderImplementationCustomUniforms(
214 void ReplaceShaderPointSize(
216 void ReplaceShaderWideLines(
218 void ReplaceShaderEdges(
220 void ReplaceShaderSelection(
222 void ReplaceShaderTCoord(
224 void ReplaceShaderClip(
230 bool GetCoordShiftAndScaleEnabled();
231 int GetCoordShiftAndScaleMethod();
232 void SetShiftValues(
double x,
double y,
double z);
233 void SetScaleValues(
double x,
double y,
double z);
248 unsigned int GetNumberOfTextures(
vtkActor* actor);
249 virtual std::vector<TextureInfo> GetTextures(
vtkActor* actor);
250 std::pair<std::string, std::string> GetTextureCoordinateAndSamplerBufferNames(
const char* tname);
294 bool CoordinateShiftAndScaleInUse =
false;
302 bool CanRender =
false;
303 bool UsesEdgeValueBuffer =
false;
304 bool UsesCellMapBuffer =
false;
320 std::unique_ptr<vtkOpenGLLowMemoryCellTypeAgent>
Agent;
321 std::function<vtkCellGraphicsPrimitiveMap::PrimitiveDescriptor(vtkPolyData*)>
GeneratorFunction;
327 bool UseIndexedRendering =
true;
328 bool DrawingVertices =
false;
329 bool HasColors =
false;
330 bool HasTangents =
false;
331 bool HasPointNormals =
false;
332 bool HasCellNormals =
false;
333 bool HasPointTextureCoordinates =
false;
338 bool ForceTextureCoordinates =
false;
344 bool PopulateSelectionSettings =
true;
345 bool PointPicking =
false;
348 bool HasAnisotropy =
false;
349 bool HasClearCoat =
false;
350 bool UsesNormalMap =
false;
351 bool UsesCoatNormalMap =
false;
352 bool UsesRotationMap =
false;
363 int numberOfPseudoPrimitivesPerElement,
bool inVertexVisibilityPass)
const;
374 int ViewportDimensions = -1;
376 int RenderPointsAsSpheres = -1;
377 int RenderLinesAsTubes = -1;
378 int PointPicking = -1;
379 int VertexColor = -1;
381 int EdgeOpacity = -1;
382 int EdgeVisibility = -1;
385 int CameraParallel = -1;
388 int NumClipPlanes = -1;
390 int MapperIndex = -1;
393 int EnableLights = -1;
395 int PrimitiveSize = -1;
397 int CellIdOffset = -1;
398 int VertexIdOffset = -1;
399 int EdgeValueBufferOffset = -1;
400 int PointIdOffset = -1;
401 int PrimitiveIdOffset = -1;
402 int UsesCellMap = -1;
403 int UsesEdgeValues = -1;
404 int UseIndexedPointId = -1;
407 unsigned int CachedLocLinkCount = 0;
410 void UpdateUniformLocations();
423 #define vtkOpenGLLowMemoryPolyDataMapper_OVERRIDE_ATTRIBUTES \
424 vtkOpenGLLowMemoryPolyDataMapper::CreateOverrideAttributes()
425 VTK_ABI_NAMESPACE_END
426 #endif // vtkOpenGLLowMemoryPolyDataMapper_h
abstract superclass for all actors, volumes and annotations
vtkTimeStamp SelectionStateTimeStamp
Attribute for vtkObjectFactory overrides.
void ShallowCopy(vtkAbstractMapper *m) override
Make a shallow copy of this mapper.
represents an object (geometry & properties) in a rendered scene
virtual MapperHashType GenerateHash(vtkPolyData *)
This hash integer is computed by concrete graphics implementation of this class.
std::array< double, 3 > ShiftValues
virtual void MapDataArrayToMultiTextureAttribute(const char *textureName, const char *dataArrayName, int fieldAssociation, int componentno=-1)
virtual void RemoveAllVertexAttributeMappings()
Remove all vertex attributes.
vtkTimeStamp ShiftScaleTimeStamp
vtkTimeStamp PBRStateTimeStamp
Decide whether a particular cell-group draw may use the indexed (glDrawElementsInstanced) fast path...
std::set< std::string > ModNamesUnique
record modification and/or execution time
std::array< double, 3 > ScaleValues
abstract specification for renderers
virtual void RenderPiece(vtkRenderer *, vtkActor *)
Implemented by sub classes.
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 ...
concrete dataset represents vertices, lines, polygons, and triangle strips
Maps VTK_LINE and VTK_POLY_LINE into GL_LINES and draws GL_LINES or GL_POINTS.
vtkTimeStamp RenderTimeStamp
virtual void RemoveVertexAttributeMapping(const char *vertexAttributeName)
Remove a vertex attribute mapping.
PolyDataMapper using OpenGL to render surface meshes.
window superclass for vtkRenderWindow
std::uintptr_t MapperHashType
ShaderNormalSourceAttribute
a simple class to control print indentation
abstract superclass for arrays of numeric data
Maps VTK_TRIANGLE and VTK_POLYGON into GL_TRIANGLES and draws GL_TRIANGLES or GL_LINES or GL_POINTS...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkNew< vtkTransform > SSInverseTransform
#define VTK_MARSHALEXCLUDE(reason)
std::array< PrimitiveInformation, 4 > Primitives
Hybrid surface/expansion dispatch switch. See the public accessors.
vtkWeakPtr< vtkShaderProgram > CachedLocProgram
Resolve UniformLocs against the current ShaderProgram if it changed or was relinked since the last ca...
abstract class specifies interface to map data
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.
map vtkPolyData to graphics primitives
static std::vector< std::string > DefaultModNames
vtkNew< vtkInformation > LastRenderPassInfo
std::pair< vtkTexture *, std::string > TextureInfo
A base class for mappers or render responders that need to draw primitives via vertex-pulling.
bool GetSupportsSelection() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
static vtkPolyDataMapper * New()
virtual vtkIdType GetMaximumNumberOfTriangles(vtkRenderer *)
Returns an estimate of the number of triangles that can be rendered by the underlying graphics implem...
std::map< std::string, ExtraAttributeValue > ExtraAttributes
vtkTimeStamp ShaderBuildTimeStamp
Helps vtkOpenGLLowMemoryPolyDataMapper map and draw cell types from vtkPolyData as OpenGL graphics pr...
Maps VTK_VERTEX and VTK_POLY_VERTEX into GL_POINTS and draws GL_POINTS.
std::vector< std::string > ModNames
virtual void SetVBOShiftScaleMethod(int)
A convenience method for enabling/disabling the VBO's shift+scale transform.
vtkNew< vtkMatrix4x4 > SSMatrix
ShaderColorSourceAttribute
std::vector< vtkOpenGLShaderDeclaration > ShaderDecls
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
The ShaderProgram uses one or more Shader objects.
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL