diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-11 16:01:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 16:01:55 +0100 |
commit | 1eb424ec9549bdd086dfb54c847d107519be73d9 (patch) | |
tree | d9a3ec0c72f3a4eda02e16ed883f560e02cf1ccf /modules/theora/video_stream_theora.cpp | |
parent | 3e3f8a47616327d7faeb17f558bb81a943385e82 (diff) | |
parent | db81928e08cb58d5f67908c6dfcf9433e572ffe8 (diff) |
Merge pull request #36098 from godotengine/vulkan
Add initial Vulkan support, master branch goes UNSTABLE
Diffstat (limited to 'modules/theora/video_stream_theora.cpp')
-rw-r--r-- | modules/theora/video_stream_theora.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 00c7e87568..de229745f5 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -110,7 +110,7 @@ void VideoStreamPlaybackTheora::video_write(void) { Ref<Image> img = memnew(Image(size.x, size.y, 0, Image::FORMAT_RGBA8, frame_data)); //zero copy image creation - texture->set_data(img); //zero copy send to visual server + texture->update(img, true); //zero copy send to visual server frames_pending = 1; } @@ -336,7 +336,9 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) { size.x = w; size.y = h; - texture->create(w, h, Image::FORMAT_RGBA8, Texture::FLAG_FILTER | Texture::FLAG_VIDEO_SURFACE); + Ref<Image> img; + img.instance(); + img->create(w, h, false, Image::FORMAT_RGBA8); } else { /* tear down the partial theora setup */ @@ -369,7 +371,7 @@ float VideoStreamPlaybackTheora::get_time() const { return time - /* AudioServer::get_singleton()->get_output_latency() - */ delay_compensation; }; -Ref<Texture> VideoStreamPlaybackTheora::get_texture() const { +Ref<Texture2D> VideoStreamPlaybackTheora::get_texture() const { return texture; } |