Class GltfBufferView
- Namespace
- Godot
- Assembly
- GodotSharp.dll
GLTFBufferView is a data structure representing GLTF a 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 Buffer, ByteLength, and ByteOffset. The ByteStride and Indices properties are for more advanced use cases such as interleaved mesh data encoded for the GPU.
[GodotClassName("GLTFBufferView")]
public class GltfBufferView : Resource, IDisposable
- Inheritance
-
GltfBufferView
- Implements
- Inherited Members
Constructors
GltfBufferView()
public GltfBufferView()
Properties
Buffer
The index of the buffer this buffer view is referencing. If -1
, this buffer view is not referencing any buffer.
public int Buffer { get; set; }
Property Value
ByteLength
The length, in bytes, of this buffer view. If 0
, this buffer view is empty.
public int ByteLength { get; set; }
Property Value
ByteOffset
The offset, in bytes, from the start of the buffer to the start of this buffer view.
public int ByteOffset { get; set; }
Property Value
ByteStride
The stride, in bytes, between interleaved data. If -1
, this buffer view is not interleaved.
public int ByteStride { get; set; }
Property Value
Indices
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.
public bool Indices { get; set; }
Property Value
VertexAttributes
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.
public bool VertexAttributes { get; set; }
Property Value
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
LoadBufferViewData(GltfState)
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[].
public byte[] LoadBufferViewData(GltfState state)
Parameters
state
GltfState
Returns
- byte[]