You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Texture refactor
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
This commit is contained in:
@@ -132,7 +132,11 @@ bool VideoStreamPlaybackGDNative::open_file(const String &p_file) {
|
||||
pcm_write_idx = -1;
|
||||
samples_decoded = 0;
|
||||
|
||||
texture->create((int)texture_size.width, (int)texture_size.height, Image::FORMAT_RGBA8, Texture::FLAG_FILTER | Texture::FLAG_VIDEO_SURFACE);
|
||||
Ref<Image> img;
|
||||
img.instance();
|
||||
img->create((int)texture_size.width, false, (int)texture_size.height, Image::FORMAT_RGBA8);
|
||||
|
||||
texture->create_from_image(img);
|
||||
}
|
||||
|
||||
return file_opened;
|
||||
@@ -192,7 +196,7 @@ void VideoStreamPlaybackGDNative::update_texture() {
|
||||
|
||||
Ref<Image> img = memnew(Image(texture_size.width, texture_size.height, 0, Image::FORMAT_RGBA8, *pba));
|
||||
|
||||
texture->set_data(img);
|
||||
texture->update(img, true);
|
||||
}
|
||||
|
||||
// ctor and dtor
|
||||
@@ -283,7 +287,7 @@ void VideoStreamPlaybackGDNative::set_paused(bool p_paused) {
|
||||
paused = p_paused;
|
||||
}
|
||||
|
||||
Ref<Texture> VideoStreamPlaybackGDNative::get_texture() const {
|
||||
Ref<Texture2D> VideoStreamPlaybackGDNative::get_texture() const {
|
||||
return texture;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user