2D: Switch to VBOs for instance data
- Add support for vertex bindings and UMA vertex buffers in D3D12. - Simplify 2D instance params and move more into per-batch data to save bandwidth Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Co-authored-by: Clay John <claynjohn@gmail.com> Co-authored-by: A Thousand Ships <96648715+athousandships@users.noreply.github.com>
This commit is contained in:
@ -9,6 +9,10 @@
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="binding" type="int" setter="set_binding" getter="get_binding" default="4294967295">
|
||||
The index of the buffer in the vertex buffer array to bind this vertex attribute. When set to [code]-1[/code], it defaults to the index of the attribute.
|
||||
[b]Note:[/b] You cannot mix binding explicitly assigned attributes with implicitly assigned ones (i.e. [code]-1[/code]). Either all attributes must have their binding set to [code]-1[/code], or all must have explicit bindings.
|
||||
</member>
|
||||
<member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="232">
|
||||
The way that this attribute's data is interpreted when sent to a shader.
|
||||
</member>
|
||||
|
||||
@ -335,6 +335,17 @@
|
||||
Binds [param vertex_array] to the specified [param draw_list].
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_list_bind_vertex_buffers_format">
|
||||
<return type="void" />
|
||||
<param index="0" name="draw_list" type="int" />
|
||||
<param index="1" name="vertex_format" type="int" />
|
||||
<param index="2" name="vertex_count" type="int" />
|
||||
<param index="3" name="vertex_buffers" type="RID[]" />
|
||||
<param index="4" name="offsets" type="PackedInt64Array" default="PackedInt64Array()" />
|
||||
<description>
|
||||
Binds a set of [param vertex_buffers] directly to the specified [param draw_list] using [param vertex_format] without creating a vertex array RID. Provide the number of vertices in [param vertex_count]; optional per-buffer byte [param offsets] may also be supplied.
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_list_disable_scissor">
|
||||
<return type="void" />
|
||||
<param index="0" name="draw_list" type="int" />
|
||||
|
||||
Reference in New Issue
Block a user