Platform SDK: DirectX

Direct3DVertexBuffer7.Optimize

The Direct3DVertexBuffer7.Optimize method converts an unoptimized vertex buffer into an optimized vertex buffer.

object.Optimize(dev As Direct3DDevice7)

Parameters

object
Object expression that resolves to a Direct3DVertexBuffer7 object.
dev
A Direct3DDevice7 object of the device for which this vertex buffer will be optimized.

Error Codes

If the method fails, an error is raised and Err.Number may be set to one of the following values:

D3DERR_VERTEXBUFFEROPTIMIZED
D3DERR_VERTEXBUFFERLOCKED
DDERR_INVALIDPARAMS
DDERR_OUTOFMEMORY

For information on trapping errors, see the Visual Basic Error Trapping topic.

See Also

Optimizing a Vertex Buffer, Vertex Buffers