Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/modules/gltf/doc_classes/GLTFBufferView.xml
20904 views
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<class name="GLTFBufferView" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
3
<brief_description>
4
Represents a glTF buffer view.
5
</brief_description>
6
<description>
7
GLTFBufferView is a data structure representing a glTF [code]bufferView[/code] that would be found in the [code]"bufferViews"[/code] 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.
8
Most custom uses of buffers only need to use the [member buffer], [member byte_length], and [member byte_offset]. The [member byte_stride] and [member indices] properties are for more advanced use cases such as interleaved mesh data encoded for the GPU.
9
</description>
10
<tutorials>
11
<link title="Buffers, BufferViews, and Accessors in Khronos glTF specification">https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md</link>
12
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
13
</tutorials>
14
<methods>
15
<method name="from_dictionary" qualifiers="static">
16
<return type="GLTFBufferView" />
17
<param index="0" name="dictionary" type="Dictionary" />
18
<description>
19
Creates a new GLTFBufferView instance by parsing the given [Dictionary].
20
</description>
21
</method>
22
<method name="load_buffer_view_data" qualifiers="const">
23
<return type="PackedByteArray" />
24
<param index="0" name="state" type="GLTFState" />
25
<description>
26
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 [PackedByteArray].
27
</description>
28
</method>
29
<method name="to_dictionary" qualifiers="const">
30
<return type="Dictionary" />
31
<description>
32
Serializes this GLTFBufferView instance into a [Dictionary].
33
</description>
34
</method>
35
</methods>
36
<members>
37
<member name="buffer" type="int" setter="set_buffer" getter="get_buffer" default="-1">
38
The index of the buffer this buffer view is referencing. If [code]-1[/code], this buffer view is not referencing any buffer.
39
</member>
40
<member name="byte_length" type="int" setter="set_byte_length" getter="get_byte_length" default="0">
41
The length, in bytes, of this buffer view. If [code]0[/code], this buffer view is empty.
42
</member>
43
<member name="byte_offset" type="int" setter="set_byte_offset" getter="get_byte_offset" default="0">
44
The offset, in bytes, from the start of the buffer to the start of this buffer view.
45
</member>
46
<member name="byte_stride" type="int" setter="set_byte_stride" getter="get_byte_stride" default="-1">
47
The stride, in bytes, between interleaved data. If [code]-1[/code], this buffer view is not interleaved.
48
</member>
49
<member name="indices" type="bool" setter="set_indices" getter="get_indices" default="false">
50
[code]true[/code] if the GLTFBufferView's OpenGL GPU buffer type is an [code]ELEMENT_ARRAY_BUFFER[/code] used for vertex indices (integer constant [code]34963[/code]). [code]false[/code] if the buffer type is any other value. See [url=https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md]Buffers, BufferViews, and Accessors[/url] for possible values. This property is set on import and used on export.
51
</member>
52
<member name="vertex_attributes" type="bool" setter="set_vertex_attributes" getter="get_vertex_attributes" default="false">
53
[code]true[/code] if the GLTFBufferView's OpenGL GPU buffer type is an [code]ARRAY_BUFFER[/code] used for vertex attributes (integer constant [code]34962[/code]). [code]false[/code] if the buffer type is any other value. See [url=https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md]Buffers, BufferViews, and Accessors[/url] for possible values. This property is set on import and used on export.
54
</member>
55
</members>
56
</class>
57
58