Merge pull request #24651 from BastiaanOlij/fix_texture_get_data
Fix texture type not being initialised
This commit is contained in:
commit
ede4f9712d
4 changed files with 6 additions and 1 deletions
|
@ -4104,6 +4104,7 @@ RID RasterizerStorageGLES2::render_target_create() {
|
||||||
|
|
||||||
Texture *t = memnew(Texture);
|
Texture *t = memnew(Texture);
|
||||||
|
|
||||||
|
t->type = VS::TEXTURE_TYPE_2D;
|
||||||
t->flags = 0;
|
t->flags = 0;
|
||||||
t->width = 0;
|
t->width = 0;
|
||||||
t->height = 0;
|
t->height = 0;
|
||||||
|
|
|
@ -264,6 +264,7 @@ public:
|
||||||
alloc_width(0),
|
alloc_width(0),
|
||||||
alloc_height(0),
|
alloc_height(0),
|
||||||
format(Image::FORMAT_L8),
|
format(Image::FORMAT_L8),
|
||||||
|
type(VS::TEXTURE_TYPE_2D),
|
||||||
target(0),
|
target(0),
|
||||||
data_size(0),
|
data_size(0),
|
||||||
total_data_size(0),
|
total_data_size(0),
|
||||||
|
|
|
@ -1995,7 +1995,8 @@ void RasterizerStorageGLES3::_update_shader(Shader *p_shader) const {
|
||||||
actions = &shaders.actions_particles;
|
actions = &shaders.actions_particles;
|
||||||
actions->uniforms = &p_shader->uniforms;
|
actions->uniforms = &p_shader->uniforms;
|
||||||
} break;
|
} break;
|
||||||
case VS::SHADER_MAX: break; // Can't happen, but silences warning
|
case VS::SHADER_MAX:
|
||||||
|
break; // Can't happen, but silences warning
|
||||||
}
|
}
|
||||||
|
|
||||||
Error err = shaders.compiler.compile(p_shader->mode, p_shader->code, actions, p_shader->path, gen_code);
|
Error err = shaders.compiler.compile(p_shader->mode, p_shader->code, actions, p_shader->path, gen_code);
|
||||||
|
@ -7019,6 +7020,7 @@ RID RasterizerStorageGLES3::render_target_create() {
|
||||||
|
|
||||||
Texture *t = memnew(Texture);
|
Texture *t = memnew(Texture);
|
||||||
|
|
||||||
|
t->type = VS::TEXTURE_TYPE_2D;
|
||||||
t->flags = 0;
|
t->flags = 0;
|
||||||
t->width = 0;
|
t->width = 0;
|
||||||
t->height = 0;
|
t->height = 0;
|
||||||
|
|
|
@ -291,6 +291,7 @@ public:
|
||||||
width(0),
|
width(0),
|
||||||
height(0),
|
height(0),
|
||||||
format(Image::FORMAT_L8),
|
format(Image::FORMAT_L8),
|
||||||
|
type(VS::TEXTURE_TYPE_2D),
|
||||||
target(GL_TEXTURE_2D),
|
target(GL_TEXTURE_2D),
|
||||||
data_size(0),
|
data_size(0),
|
||||||
compressed(false),
|
compressed(false),
|
||||||
|
|
Loading…
Reference in a new issue