diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-09-27 16:48:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 16:48:09 +0200 |
commit | 4cf5bb027678717263476e676cd23f881eef1ca1 (patch) | |
tree | a842d54e82a4998c8b593f86fef858560c10b4d2 /drivers/gles2/rasterizer_scene_gles2.cpp | |
parent | cb5a62903f9798da8b12f625cbd5a493f14e41d3 (diff) | |
parent | cdc411fd54fbafc414b29abb1d50a0ff327f0d89 (diff) |
Merge pull request #22446 from akien-mga/fix-warnings
Fix various warnings raised by GCC 5
Diffstat (limited to 'drivers/gles2/rasterizer_scene_gles2.cpp')
-rw-r--r-- | drivers/gles2/rasterizer_scene_gles2.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index 56605a9fe5..9d78c4c097 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -712,10 +712,8 @@ void RasterizerSceneGLES2::_add_geometry_with_material(RasterizerStorageGLES2::G bool has_alpha = has_base_alpha || has_blend_alpha; bool mirror = p_instance->mirror; - bool no_cull = false; if (p_material->shader->spatial.cull_mode == RasterizerStorageGLES2::Shader::Spatial::CULL_MODE_DISABLED) { - no_cull = true; mirror = false; } else if (p_material->shader->spatial.cull_mode == RasterizerStorageGLES2::Shader::Spatial::CULL_MODE_FRONT) { mirror = !mirror; @@ -738,7 +736,6 @@ void RasterizerSceneGLES2::_add_geometry_with_material(RasterizerStorageGLES2::G //shader does not use discard and does not write a vertex position, use generic material if (p_instance->cast_shadows == VS::SHADOW_CASTING_SETTING_DOUBLE_SIDED) { p_material = storage->material_owner.getptr(!p_shadow_pass && p_material->shader->spatial.uses_world_coordinates ? default_worldcoord_material_twosided : default_material_twosided); - no_cull = true; mirror = false; } else { p_material = storage->material_owner.getptr(!p_shadow_pass && p_material->shader->spatial.uses_world_coordinates ? default_worldcoord_material : default_material); @@ -1136,8 +1133,6 @@ void RasterizerSceneGLES2::_setup_geometry(RenderList::Element *p_element, Raste bone_weight[3] = (weight_ptr[3] / (float)0xFFFF); } - size_t offset = i * 12; - Transform transform; Transform bone_transforms[4] = { @@ -1202,7 +1197,6 @@ void RasterizerSceneGLES2::_setup_geometry(RenderList::Element *p_element, Raste } break; case VS::INSTANCE_MULTIMESH: { - RasterizerStorageGLES2::MultiMesh *multi_mesh = static_cast<RasterizerStorageGLES2::MultiMesh *>(p_element->owner); RasterizerStorageGLES2::Surface *s = static_cast<RasterizerStorageGLES2::Surface *>(p_element->geometry); glBindBuffer(GL_ARRAY_BUFFER, s->vertex_id); @@ -2267,7 +2261,6 @@ void RasterizerSceneGLES2::render_shadow(RID p_light, RID p_shadow_atlas, int p_ uint32_t y; uint32_t width; uint32_t height; - uint32_t vp_height; float zfar = 0; bool flip_facing = false; @@ -2353,14 +2346,12 @@ void RasterizerSceneGLES2::render_shadow(RID p_light, RID p_shadow_atlas, int p_ normal_bias = light->param[VS::LIGHT_PARAM_SHADOW_NORMAL_BIAS] * bias_mult; fbo = directional_shadow.fbo; - vp_height = directional_shadow.size; } else { ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_shadow_atlas); ERR_FAIL_COND(!shadow_atlas); ERR_FAIL_COND(!shadow_atlas->shadow_owners.has(p_light)); fbo = shadow_atlas->fbo; - vp_height = shadow_atlas->size; uint32_t key = shadow_atlas->shadow_owners[p_light]; @@ -2669,10 +2660,6 @@ void RasterizerSceneGLES2::initialize() { } shadow_filter_mode = SHADOW_FILTER_NEAREST; - - RenderList::Element e; - e.sort_key = 0; - e.light_type1 = 1; } void RasterizerSceneGLES2::iteration() { |