GLTFBufferView.xml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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="load_buffer_view_data" qualifiers="const">
  16. <return type="PackedByteArray" />
  17. <param index="0" name="state" type="GLTFState" />
  18. <description>
  19. 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].
  20. </description>
  21. </method>
  22. </methods>
  23. <members>
  24. <member name="buffer" type="int" setter="set_buffer" getter="get_buffer" default="-1">
  25. The index of the buffer this buffer view is referencing. If [code]-1[/code], this buffer view is not referencing any buffer.
  26. </member>
  27. <member name="byte_length" type="int" setter="set_byte_length" getter="get_byte_length" default="0">
  28. The length, in bytes, of this buffer view. If [code]0[/code], this buffer view is empty.
  29. </member>
  30. <member name="byte_offset" type="int" setter="set_byte_offset" getter="get_byte_offset" default="0">
  31. The offset, in bytes, from the start of the buffer to the start of this buffer view.
  32. </member>
  33. <member name="byte_stride" type="int" setter="set_byte_stride" getter="get_byte_stride" default="-1">
  34. The stride, in bytes, between interleaved data. If [code]-1[/code], this buffer view is not interleaved.
  35. </member>
  36. <member name="indices" type="bool" setter="set_indices" getter="get_indices" default="false">
  37. [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.
  38. </member>
  39. <member name="vertex_attributes" type="bool" setter="set_vertex_attributes" getter="get_vertex_attributes" default="false">
  40. [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.
  41. </member>
  42. </members>
  43. </class>