godotengine / godotengine/godot-docs
GDScript `RenderingDevice.texture_buffer_create` arguments named incorrectly
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
**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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.