Skip to content

Commit

Permalink
Readd VS.sync and VS.draw to keep compatibility
Browse files Browse the repository at this point in the history
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 godotengine#15892.

(cherry picked from commit fd92e57)
  • Loading branch information
akien-mga authored and malcolmhoward committed Jul 31, 2018
1 parent 2dd8999 commit 7358bbd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions servers/visual_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,12 @@ void VisualServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("sync"), &VisualServer::sync);
ClassDB::bind_method(D_METHOD("draw", "swap_buffers", "frame_step"), &VisualServer::draw, DEFVAL(true), DEFVAL(0.0));

// "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));
Expand Down

0 comments on commit 7358bbd

Please sign in to comment.