From e56fc6b3382125d2a84cbe7f4155948f4cbd7567 Mon Sep 17 00:00:00 2001 From: Patrick Dawson Date: Thu, 3 Nov 2022 22:14:55 +0100 Subject: Expose vertex_array_create --- doc/classes/RenderingDevice.xml | 9 +++++++++ servers/rendering/rendering_device.cpp | 1 + 2 files changed, 10 insertions(+) diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index cb13697cc2..2de812f5fc 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -643,6 +643,15 @@ + + + + + + + Creates a vertex array based on the specified buffers. + + diff --git a/servers/rendering/rendering_device.cpp b/servers/rendering/rendering_device.cpp index 93118f39e7..bb4c41df52 100644 --- a/servers/rendering/rendering_device.cpp +++ b/servers/rendering/rendering_device.cpp @@ -393,6 +393,7 @@ void RenderingDevice::_bind_methods() { ClassDB::bind_method(D_METHOD("vertex_buffer_create", "size_bytes", "data", "use_as_storage"), &RenderingDevice::vertex_buffer_create, DEFVAL(Vector()), DEFVAL(false)); ClassDB::bind_method(D_METHOD("vertex_format_create", "vertex_descriptions"), &RenderingDevice::_vertex_format_create); + ClassDB::bind_method(D_METHOD("vertex_array_create", "vertex_count", "vertex_format", "src_buffers"), &RenderingDevice::_vertex_array_create); ClassDB::bind_method(D_METHOD("index_buffer_create", "size_indices", "format", "data", "use_restart_indices"), &RenderingDevice::index_buffer_create, DEFVAL(Vector()), DEFVAL(false)); ClassDB::bind_method(D_METHOD("index_array_create", "index_buffer", "index_offset", "index_count"), &RenderingDevice::index_array_create); -- cgit v1.2.3