Fixed many more bugs reported by Valgrind
This commit is contained in:
parent
6b35211c53
commit
3adb42e217
|
@ -454,6 +454,7 @@ RID RasterizerSceneGLES3::reflection_atlas_create() {
|
|||
ReflectionAtlas *reflection_atlas = memnew( ReflectionAtlas );
|
||||
reflection_atlas->subdiv=0;
|
||||
reflection_atlas->color=0;
|
||||
reflection_atlas->size=0;
|
||||
for(int i=0;i<6;i++) {
|
||||
reflection_atlas->fbo[i]=0;
|
||||
}
|
||||
|
@ -4576,6 +4577,9 @@ void RasterizerSceneGLES3::_generate_brdf() {
|
|||
|
||||
void RasterizerSceneGLES3::initialize() {
|
||||
|
||||
|
||||
render_pass=0;
|
||||
|
||||
state.scene_shader.init();
|
||||
|
||||
default_shader = storage->shader_create(VS::SHADER_SPATIAL);
|
||||
|
|
|
@ -1476,9 +1476,11 @@ void RasterizerStorageGLES3::_update_shader(Shader* p_shader) const {
|
|||
p_shader->spatial.depth_draw_mode=Shader::Spatial::DEPTH_DRAW_OPAQUE;
|
||||
p_shader->spatial.cull_mode=Shader::Spatial::CULL_MODE_BACK;
|
||||
p_shader->spatial.uses_alpha=false;
|
||||
p_shader->spatial.uses_discard=false;
|
||||
p_shader->spatial.unshaded=false;
|
||||
p_shader->spatial.ontop=false;
|
||||
p_shader->spatial.uses_sss=false;
|
||||
p_shader->spatial.uses_vertex=false;
|
||||
|
||||
shaders.actions_scene.render_mode_values["blend_add"]=Pair<int*,int>(&p_shader->spatial.blend_mode,Shader::Spatial::BLEND_MODE_ADD);
|
||||
shaders.actions_scene.render_mode_values["blend_mix"]=Pair<int*,int>(&p_shader->spatial.blend_mode,Shader::Spatial::BLEND_MODE_MIX);
|
||||
|
@ -1501,6 +1503,7 @@ void RasterizerStorageGLES3::_update_shader(Shader* p_shader) const {
|
|||
shaders.actions_scene.usage_flag_pointers["VERTEX"]=&p_shader->spatial.uses_vertex;
|
||||
|
||||
shaders.actions_scene.usage_flag_pointers["SSS_STRENGTH"]=&p_shader->spatial.uses_sss;
|
||||
shaders.actions_scene.usage_flag_pointers["DISCARD"]=&p_shader->spatial.uses_discard;
|
||||
|
||||
actions=&shaders.actions_scene;
|
||||
actions->uniforms=&p_shader->uniforms;
|
||||
|
|
|
@ -579,6 +579,7 @@ Error ShaderCompilerGLES3::compile(VS::ShaderMode p_mode, const String& p_code,
|
|||
r_gen_code.uses_vertex_time=false;
|
||||
|
||||
|
||||
|
||||
used_name_defines.clear();
|
||||
used_rmode_defines.clear();
|
||||
|
||||
|
|
|
@ -2760,7 +2760,7 @@ Viewport::Viewport() {
|
|||
|
||||
shadow_atlas_size=0;
|
||||
for(int i=0;i<4;i++) {
|
||||
shadow_atlas_quadrant_subdiv[0]=SHADOW_ATLAS_QUADRANT_SUBDIV_MAX;
|
||||
shadow_atlas_quadrant_subdiv[i]=SHADOW_ATLAS_QUADRANT_SUBDIV_MAX;
|
||||
}
|
||||
set_shadow_atlas_quadrant_subdiv(0,SHADOW_ATLAS_QUADRANT_SUBDIV_4);
|
||||
set_shadow_atlas_quadrant_subdiv(1,SHADOW_ATLAS_QUADRANT_SUBDIV_4);
|
||||
|
|
|
@ -71,6 +71,7 @@ public:
|
|||
disable_environment=false;
|
||||
viewport_to_screen=0;
|
||||
shadow_atlas_size=0;
|
||||
disable_3d=false;
|
||||
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue