diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 85e6207d3f1..4bc6a49e918 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -24,6 +24,20 @@ + + + + + + + + + + + Schedules a callback to the corresponding named 'method' on 'where' after a frame has been drawn. + The callback method must use only 1 argument which will be called with 'userdata'. + + diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 2b34aa0e42a..979b2ed8ecb 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -1447,6 +1447,7 @@ void VisualServer::_bind_methods() { ClassDB::bind_method(D_METHOD("force_sync"), &VisualServer::sync); ClassDB::bind_method(D_METHOD("force_draw"), &VisualServer::draw); + ClassDB::bind_method(D_METHOD("request_frame_drawn_callback", "where", "method", "userdata"), &VisualServer::request_frame_drawn_callback); 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"),&VisualServer::texture_allocate,DEFVAL( TEXTURE_FLAGS_DEFAULT ) );