mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Merge pull request #96928 from dsnopek/rename-and-expose-texture-create-external
Expose a function to create textures from a native handle in the compatibility renderer
This commit is contained in:
commit
b1b4c5da4b
12 changed files with 255 additions and 15 deletions
|
|
@ -2239,6 +2239,7 @@ void RenderingServer::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("texture_2d_layered_create", "layers", "layered_type"), &RenderingServer::_texture_2d_layered_create);
|
||||
ClassDB::bind_method(D_METHOD("texture_3d_create", "format", "width", "height", "depth", "mipmaps", "data"), &RenderingServer::_texture_3d_create);
|
||||
ClassDB::bind_method(D_METHOD("texture_proxy_create", "base"), &RenderingServer::texture_proxy_create);
|
||||
ClassDB::bind_method(D_METHOD("texture_create_from_native_handle", "type", "format", "native_handle", "width", "height", "depth", "layers", "layered_type"), &RenderingServer::texture_create_from_native_handle, DEFVAL(1), DEFVAL(TEXTURE_LAYERED_2D_ARRAY));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("texture_2d_update", "texture", "image", "layer"), &RenderingServer::texture_2d_update);
|
||||
ClassDB::bind_method(D_METHOD("texture_3d_update", "texture", "data"), &RenderingServer::_texture_3d_update);
|
||||
|
|
@ -2265,6 +2266,10 @@ void RenderingServer::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("texture_get_rd_texture", "texture", "srgb"), &RenderingServer::texture_get_rd_texture, DEFVAL(false));
|
||||
ClassDB::bind_method(D_METHOD("texture_get_native_handle", "texture", "srgb"), &RenderingServer::texture_get_native_handle, DEFVAL(false));
|
||||
|
||||
BIND_ENUM_CONSTANT(TEXTURE_TYPE_2D);
|
||||
BIND_ENUM_CONSTANT(TEXTURE_TYPE_LAYERED);
|
||||
BIND_ENUM_CONSTANT(TEXTURE_TYPE_3D);
|
||||
|
||||
BIND_ENUM_CONSTANT(TEXTURE_LAYERED_2D_ARRAY);
|
||||
BIND_ENUM_CONSTANT(TEXTURE_LAYERED_CUBEMAP);
|
||||
BIND_ENUM_CONSTANT(TEXTURE_LAYERED_CUBEMAP_ARRAY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue