reckfellENGINE

GltfBufferView

Represents a glTF buffer view.

On this page
class GltfBufferViewReckfellSharpInherits Resource

Represents a glTF buffer view.

GLTFBufferView is a data structure representing a glTF bufferView that would be found in the "bufferViews" array. A buffer is a blob of binary data. A buffer view is a slice of a buffer that can be used to identify and extract data from the buffer. Most custom uses of buffers only need to use the GltfBufferView.Buffer, GltfBufferView.ByteLength, and GltfBufferView.ByteOffset. The GltfBufferView.ByteStride and GltfBufferView.Indices properties are for more advanced use cases such as interleaved mesh data encoded for the GPU.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

GltfBufferViewConstructor
# GltfBufferView
C#
public GltfBufferView();

Properties6

BufferProperty
# Buffer
C#
public int Buffer { get; set; }

The index of the buffer this buffer view is referencing. If -1, this buffer view is not referencing any buffer.

ByteLengthProperty
# ByteLength
C#
public long ByteLength { get; set; }

The length, in bytes, of this buffer view. If 0, this buffer view is empty.

ByteOffsetProperty
# ByteOffset
C#
public long ByteOffset { get; set; }

The offset, in bytes, from the start of the buffer to the start of this buffer view.

ByteStrideProperty
# ByteStride
C#
public long ByteStride { get; set; }

The stride, in bytes, between interleaved data. If -1, this buffer view is not interleaved.

IndicesProperty
# Indices
C#
public bool Indices { get; set; }

true if the GLTFBufferView's OpenGL GPU buffer type is an ELEMENT_ARRAY_BUFFER used for vertex indices (integer constant 34963). false if the buffer type is any other value. See Buffers, BufferViews, and Accessors for possible values. This property is set on import and used on export.

VertexAttributesProperty
# VertexAttributes
C#
public bool VertexAttributes { get; set; }

true if the GLTFBufferView's OpenGL GPU buffer type is an ARRAY_BUFFER used for vertex attributes (integer constant 34962). false if the buffer type is any other value. See Buffers, BufferViews, and Accessors for possible values. This property is set on import and used on export.

Methods15

FromDictionaryGltfBufferView
# FromDictionary
C#
public static GltfBufferView FromDictionary(Reckfell.Collections.Dictionary dictionary);

Creates a new GLTFBufferView instance by parsing the given Reckfell.Collections.Dictionary.

Parameters
NameTypeDefault
dictionaryReckfell.Collections.Dictionary—
Returns GltfBufferView
GetBufferint
# GetBuffer
C#
public int GetBuffer();
Returns int
GetByteLengthlong
# GetByteLength
C#
public long GetByteLength();
Returns long
GetByteOffsetlong
# GetByteOffset
C#
public long GetByteOffset();
Returns long
GetByteStridelong
# GetByteStride
C#
public long GetByteStride();
Returns long
GetIndicesbool
# GetIndices
C#
public bool GetIndices();
Returns bool
GetVertexAttributesbool
# GetVertexAttributes
C#
public bool GetVertexAttributes();
Returns bool
LoadBufferViewDatabyte[]
# LoadBufferViewData
C#
public byte[] LoadBufferViewData(GltfState state);

Loads the buffer view data from the buffer referenced by this buffer view in the given GltfState. Interleaved data with a byte stride is not yet supported by this method. The data is returned as a byte[].

Parameters
NameTypeDefault
stateGltfState—
Returns byte[]
SetBuffervoid
# SetBuffer
C#
public void SetBuffer(int buffer);
Parameters
NameTypeDefault
bufferint—
SetByteLengthvoid
# SetByteLength
C#
public void SetByteLength(long byteLength);
Parameters
NameTypeDefault
byteLengthlong—
SetByteOffsetvoid
# SetByteOffset
C#
public void SetByteOffset(long byteOffset);
Parameters
NameTypeDefault
byteOffsetlong—
SetByteStridevoid
# SetByteStride
C#
public void SetByteStride(long byteStride);
Parameters
NameTypeDefault
byteStridelong—
SetIndicesvoid
# SetIndices
C#
public void SetIndices(bool indices);
Parameters
NameTypeDefault
indicesbool—
SetVertexAttributesvoid
# SetVertexAttributes
C#
public void SetVertexAttributes(bool isAttributes);
Parameters
NameTypeDefault
isAttributesbool—
ToDictionaryReckfell.Collections.Dictionary
# ToDictionary
C#
public Reckfell.Collections.Dictionary ToDictionary();

Serializes this GLTFBufferView instance into a Reckfell.Collections.Dictionary.

Returns Reckfell.Collections.Dictionary
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.