This function is an alternative for UpdateInstanceVertexBuffer(),
in case the vertex buffer should be divided over a set of arrays
this function allows to fill part of the vertex buffer given a
certain offset and size (both calculated in vertex element count).
Syntax
public const string enginedll = @"engine.dll";
[DllImport(enginedll, EntryPoint = "UpdateInstanceVertexBufferTrimmed")]
public static extern Int64 UpdateInstanceVertexBufferTrimmed(Int64 owlInstance, out float vertexBuffer, Int64 offset, Int64 size);
[DllImport(enginedll, EntryPoint = "UpdateInstanceVertexBufferTrimmed")]
public static extern Int64 UpdateInstanceVertexBufferTrimmed(Int64 owlInstance, float[] vertexBuffer, Int64 offset, Int64 size);
[DllImport(enginedll, EntryPoint = "UpdateInstanceVertexBufferTrimmed")]
public static extern Int64 UpdateInstanceVertexBufferTrimmed(Int64 owlInstance, out double vertexBuffer, Int64 offset, Int64 size);
[DllImport(enginedll, EntryPoint = "UpdateInstanceVertexBufferTrimmed")]
public static extern Int64 UpdateInstanceVertexBufferTrimmed(Int64 owlInstance, double[] vertexBuffer, Int64 offset, Int64 size);
Property owlInstance
Size: 64 bit / 8 byte (value)
The handle to the specific instance in the design tree. The instance handle is static within one open model but is most probably different when the same instance is opened in another model. The instance is always exactly of one unique class.
Property vertexBuffer
Size: 32 bit / 4 byte (reference)
The array of vertices, this array is allocated by the host application. Depending on SetFormat() the array exists of 32 bit (4 byte) single precision floats or 64 bit (8 byte) double precision floats. Each vertex elements exists of several elemens, i.e. X, Y, Z values, but optionally also nX, nY, nZ, texture coordinates, bitangent / binormal coordinates, colors etc. What is contained is defined by SetFormat() and can be retrieved via GetFormat(). The host application has to make sure enough memory is allocated for the vertexBuffer array.
Property offset
Size: 64 bit / 8 byte (value)
The given offset.
Property size
Size: 64 bit / 8 byte (value)
The given size.