CalculateInstance

This function prepares the content to be ready so the buffers can be filled. It returns the minimum size the buffers should be. This is only the case when the pointer is given, all arguments are allowed to be nullptr.

Note I: This function needs to be called directly before UpdateVertexBuffer(), UpdateIndexBuffer() and UpdateTransformationBuffer().

Syntax

//   Visual Studio for Windows
public:
void __declspec(dllexport) __stdcall CalculateInstance(
            __int64        owlInstance,
            __int64        * vertexBufferSize,
            __int64        * indexBufferSize,
            __int64        * transformationBufferSize
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
void CalculateInstance(
            int64_t        owlInstance,
            int64_t        * vertexBufferSize,
            int64_t        * indexBufferSize,
            int64_t        * transformationBufferSize
        );    

Property owlInstance

Size: 64 bit / 8 byte (value)
...

Property vertexBufferSize

Size: 64 bit / 8 byte (reference)
the calculated size that is required for the vertex buffer

Property indexBufferSize

Size: 64 bit / 8 byte (reference)
the calculated size that is required for the index buffer

Property transformationBufferSize

Size: 64 bit / 8 byte (reference)
the calculated size that is required for the transformation buffer