diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-12-30 12:33:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-30 12:33:08 +0100 |
commit | ede4f9712def8d8b83b250026612d28242a762d6 (patch) | |
tree | fcd7bff47284bd4327a15223cebf09b4f9effbbe /drivers/gles3 | |
parent | ee6f1fa3f8a7aa48ed9becb0039f39e1c7f395cc (diff) | |
parent | 9055386de9961c5fe9872389835157fa224ee45f (diff) |
Merge pull request #24651 from BastiaanOlij/fix_texture_get_data
Fix texture type not being initialised
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 4 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 2b038fcc0e..84d3d80e0e 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -1995,7 +1995,8 @@ void RasterizerStorageGLES3::_update_shader(Shader *p_shader) const { actions = &shaders.actions_particles; actions->uniforms = &p_shader->uniforms; } 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); @@ -7019,6 +7020,7 @@ RID RasterizerStorageGLES3::render_target_create() { Texture *t = memnew(Texture); + t->type = VS::TEXTURE_TYPE_2D; t->flags = 0; t->width = 0; t->height = 0; diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h index 958086f6c7..bd234d7fbe 100644 --- a/drivers/gles3/rasterizer_storage_gles3.h +++ b/drivers/gles3/rasterizer_storage_gles3.h @@ -291,6 +291,7 @@ public: width(0), height(0), format(Image::FORMAT_L8), + type(VS::TEXTURE_TYPE_2D), target(GL_TEXTURE_2D), data_size(0), compressed(false), |