GLTFBufferView

package
v0.0.0-...-9b8b246 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

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 Buffer, ByteLength, and ByteOffset. The ByteStride and Indices properties are for more advanced use cases such as interleaved mesh data encoded for the GPU.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsGLTFBufferView() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsGLTFBufferView

func (self *Extension[T]) AsGLTFBufferView() Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.GLTFBufferView

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsGLTFBufferView

func (self Instance) AsGLTFBufferView() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) Buffer

func (self Instance) Buffer() int

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

func (Instance) ByteLength

func (self Instance) ByteLength() int

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

func (Instance) ByteOffset

func (self Instance) ByteOffset() int

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

func (Instance) ByteStride

func (self Instance) ByteStride() int

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

func (Instance) ID

func (self Instance) ID() ID

func (Instance) Indices

func (self Instance) Indices() bool

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.

func (Instance) SetBuffer

func (self Instance) SetBuffer(value int)

SetBuffer sets the property returned by [GetBuffer].

func (Instance) SetByteLength

func (self Instance) SetByteLength(value int)

SetByteLength sets the property returned by [GetByteLength].

func (Instance) SetByteOffset

func (self Instance) SetByteOffset(value int)

SetByteOffset sets the property returned by [GetByteOffset].

func (Instance) SetByteStride

func (self Instance) SetByteStride(value int)

SetByteStride sets the property returned by [GetByteStride].

func (Instance) SetIndices

func (self Instance) SetIndices(value bool)

SetIndices sets the property returned by [GetIndices].

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetVertexAttributes

func (self Instance) SetVertexAttributes(value bool)

SetVertexAttributes sets the property returned by [GetVertexAttributes].

func (Instance) VertexAttributes

func (self Instance) VertexAttributes() bool

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.

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL