godot-docs icon indicating copy to clipboard operation
godot-docs copied to clipboard

GDScript `RenderingDevice.texture_buffer_create` arguments named incorrectly

Open coyo-t opened this issue 7 months ago • 0 comments

Your Godot version: 4.5dev4

Issue description: documented as texture_buffer_create(size_bytes: int, format: DataFormat, data: PackedByteArray), however size_bytes actually describes the number of elements in the buffer (being data.size() * (size of format in bytes)) passing the actual size of the buffer in bytes like the argument name suggests results in the fail condition triggering https://github.com/godotengine/godot/blob/master/servers/rendering/rendering_device.cpp#L842-L846

URL to the documentation page: https://docs.godotengine.org/en/latest/classes/class_renderingdevice.html#class-renderingdevice-method-texture-buffer-create

coyo-t avatar May 21 '25 20:05 coyo-t