summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_scene_gles3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/rasterizer_scene_gles3.cpp')
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 5bb332816d..5b6b3d44f2 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -2085,9 +2085,9 @@ void RasterizerSceneGLES3::_render_list(RenderList::Element **p_elements, int p_
case RasterizerStorageGLES3::Shader::Spatial::BLEND_MODE_MUL: {
glBlendEquation(GL_FUNC_ADD);
if (storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) {
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFuncSeparate(GL_DST_COLOR, GL_ZERO, GL_DST_ALPHA, GL_ZERO);
} else {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFuncSeparate(GL_DST_COLOR, GL_ZERO, GL_ZERO, GL_ONE);
}
} break;
@@ -5118,3 +5118,23 @@ void RasterizerSceneGLES3::finalize() {
RasterizerSceneGLES3::RasterizerSceneGLES3() {
}
+
+RasterizerSceneGLES3::~RasterizerSceneGLES3() {
+
+ memdelete(default_material.get_data());
+ memdelete(default_material_twosided.get_data());
+ memdelete(default_shader.get_data());
+ memdelete(default_shader_twosided.get_data());
+
+ memdelete(default_worldcoord_material.get_data());
+ memdelete(default_worldcoord_material_twosided.get_data());
+ memdelete(default_worldcoord_shader.get_data());
+ memdelete(default_worldcoord_shader_twosided.get_data());
+
+ memdelete(default_overdraw_material.get_data());
+ memdelete(default_overdraw_shader.get_data());
+
+ memfree(state.spot_array_tmp);
+ memfree(state.omni_array_tmp);
+ memfree(state.reflection_array_tmp);
+}