diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-02-19 10:42:47 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-02-19 10:43:07 +0100 |
commit | fd92e571ac4380b83ee1f1af5eef59f3aa8b8535 (patch) | |
tree | 4653a6eed00bed45deaf4e67fb353adf07a614dc /servers | |
parent | 772eaf156fb0c571f4e9b339db2a06d4834d31f4 (diff) |
Readd VS.sync and VS.draw to keep compatibility
Those are deprecated as VS.force_sync and VS.force_draw do the same and more explicitly,
but we cannot remove them without marking them as deprecated before that.
Fixes issue introduced in #15892.
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual_server.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 0e33f3d109..47577a3359 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -1518,6 +1518,12 @@ void VisualServer::_bind_methods() { ClassDB::bind_method(D_METHOD("force_sync"), &VisualServer::sync); ClassDB::bind_method(D_METHOD("force_draw", "swap_buffers"), &VisualServer::draw, DEFVAL(true)); + // "draw" and "sync" are deprecated duplicates of "force_draw" and "force_sync" + // FIXME: Add deprecation messages using GH-4397 once available, and retire + // once the warnings have been enabled for a full release cycle + ClassDB::bind_method(D_METHOD("sync"), &VisualServer::sync); + ClassDB::bind_method(D_METHOD("draw", "swap_buffers"), &VisualServer::draw, DEFVAL(true)); + ClassDB::bind_method(D_METHOD("texture_create"), &VisualServer::texture_create); ClassDB::bind_method(D_METHOD("texture_create_from_image", "image", "flags"), &VisualServer::texture_create_from_image, DEFVAL(TEXTURE_FLAGS_DEFAULT)); ClassDB::bind_method(D_METHOD("texture_allocate", "texture", "width", "height", "format", "flags"), &VisualServer::texture_allocate, DEFVAL(TEXTURE_FLAGS_DEFAULT)); |