FlushBuffer Method


Submits geometry for rendering.

Namespace: Autodesk.Revit.DB.DirectContext3D
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2017

Syntax

C#
public static void FlushBuffer(
	VertexBuffer vertexBuffer,
	int vertexCount,
	IndexBuffer indexBuffer,
	int indexCount,
	VertexFormat vertexFormat,
	EffectInstance effectInstance,
	PrimitiveType primitiveType,
	int start,
	int primitiveCount
)
Visual Basic
Public Shared Sub FlushBuffer ( _
	vertexBuffer As VertexBuffer, _
	vertexCount As Integer, _
	indexBuffer As IndexBuffer, _
	indexCount As Integer, _
	vertexFormat As VertexFormat, _
	effectInstance As EffectInstance, _
	primitiveType As PrimitiveType, _
	start As Integer, _
	primitiveCount As Integer _
)
Visual C++
public:
static void FlushBuffer(
	VertexBuffer^ vertexBuffer, 
	int vertexCount, 
	IndexBuffer^ indexBuffer, 
	int indexCount, 
	VertexFormat^ vertexFormat, 
	EffectInstance^ effectInstance, 
	PrimitiveType primitiveType, 
	int start, 
	int primitiveCount
)

Parameters

vertexBuffer
Type: Autodesk.Revit.DB.DirectContext3DVertexBuffer
The vertex buffer that contains vertex data.
vertexCount
Type: SystemInt32
The number of vertices in the vertex buffer.
indexBuffer
Type: Autodesk.Revit.DB.DirectContext3DIndexBuffer
The index buffer that contains indices into the vertex buffer.
indexCount
Type: SystemInt32
The number of indices in the index buffer.
vertexFormat
Type: Autodesk.Revit.DB.DirectContext3DVertexFormat
The format of the vertices in the vertex buffer.
effectInstance
Type: Autodesk.Revit.DB.DirectContext3DEffectInstance
The effect instance to be used for drawing this piece of geometry.
primitiveType
Type: Autodesk.Revit.DB.DirectContext3DPrimitiveType
The type of geometry primitive used in the index buffer.
start
Type: SystemInt32
The first index to use for drawing.
primitiveCount
Type: SystemInt32
The number of primitives to draw.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException A change in the graphics state has made the vertex buffer vertexBuffer invalid for rendering. -or- A change in the graphics state has made the index buffer indexBuffer invalid for rendering. -or- A change in the graphics state has made the vertex format vertexFormat invalid for rendering. -or- A change in the graphics state has made the effect instance effectInstance invalid for rendering. -or- The vertex format vertexFormat and the effect instance effectInstance do not match.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
Autodesk.Revit.ExceptionsInvalidOperationException This DrawContext is not available because Revit is not currently rendering. In general, this DrawContext must be used in the scope of the RenderScene() callback of IDirectContext3DServer.

See Also