summaryrefslogtreecommitdiff
path: root/drivers/gles3
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3')
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp9
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.h1
-rw-r--r--drivers/gles3/rasterizer_gles3.cpp6
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp7
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp7
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.h3
-rw-r--r--drivers/gles3/shader_compiler_gles3.cpp2
-rw-r--r--drivers/gles3/shader_compiler_gles3.h2
-rw-r--r--drivers/gles3/shader_gles3.cpp2
-rw-r--r--drivers/gles3/shader_gles3.h10
10 files changed, 27 insertions, 22 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index da87a71679..c9bdc6f5c3 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -29,10 +29,12 @@
/*************************************************************************/
#include "rasterizer_canvas_gles3.h"
-#include "os/os.h"
-#include "project_settings.h"
+
+#include "core/os/os.h"
+#include "core/project_settings.h"
#include "rasterizer_scene_gles3.h"
#include "servers/visual/visual_server_raster.h"
+
#ifndef GLES_OVER_GL
#define glClearDepth glClearDepthf
#endif
@@ -1418,7 +1420,7 @@ void RasterizerCanvasGLES3::canvas_render_items(Item *p_item_list, int p_z, cons
if (blend_mode == RasterizerStorageGLES3::Shader::CanvasItem::BLEND_MODE_DISABLED && (!storage->frame.current_rt || !storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT])) {
blend_mode = RasterizerStorageGLES3::Shader::CanvasItem::BLEND_MODE_MIX;
}
- bool unshaded = shader_cache && (shader_cache->canvas_item.light_mode == RasterizerStorageGLES3::Shader::CanvasItem::LIGHT_MODE_UNSHADED || blend_mode != RasterizerStorageGLES3::Shader::CanvasItem::BLEND_MODE_MIX);
+ bool unshaded = shader_cache && (shader_cache->canvas_item.light_mode == RasterizerStorageGLES3::Shader::CanvasItem::LIGHT_MODE_UNSHADED || (blend_mode != RasterizerStorageGLES3::Shader::CanvasItem::BLEND_MODE_MIX && blend_mode != RasterizerStorageGLES3::Shader::CanvasItem::BLEND_MODE_PMALPHA));
bool reclip = false;
if (last_blend_mode != blend_mode) {
@@ -1591,6 +1593,7 @@ void RasterizerCanvasGLES3::canvas_render_items(Item *p_item_list, int p_z, cons
if (!t) {
glBindTexture(GL_TEXTURE_2D, storage->resources.white_tex);
} else {
+ t = t->get_ptr();
glBindTexture(t->target, t->tex_id);
}
diff --git a/drivers/gles3/rasterizer_canvas_gles3.h b/drivers/gles3/rasterizer_canvas_gles3.h
index c7f2e54efb..bc4ea80328 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.h
+++ b/drivers/gles3/rasterizer_canvas_gles3.h
@@ -33,6 +33,7 @@
#include "rasterizer_storage_gles3.h"
#include "servers/visual/rasterizer.h"
+
#include "shaders/canvas_shadow.glsl.gen.h"
class RasterizerSceneGLES3;
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp
index e4824695d5..d3f6dcd497 100644
--- a/drivers/gles3/rasterizer_gles3.cpp
+++ b/drivers/gles3/rasterizer_gles3.cpp
@@ -30,11 +30,9 @@
#include "rasterizer_gles3.h"
+#include "core/os/os.h"
+#include "core/project_settings.h"
#include "gl_context/context_gl.h"
-#include "os/os.h"
-#include "project_settings.h"
-
-#include <string.h>
RasterizerStorage *RasterizerGLES3::get_storage() {
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 88f14890ef..947729f6f6 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -29,9 +29,10 @@
/*************************************************************************/
#include "rasterizer_scene_gles3.h"
-#include "math_funcs.h"
-#include "os/os.h"
-#include "project_settings.h"
+
+#include "core/math/math_funcs.h"
+#include "core/os/os.h"
+#include "core/project_settings.h"
#include "rasterizer_canvas_gles3.h"
#include "servers/visual/visual_server_raster.h"
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 0bb0e12b8e..c05f4cfbe3 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -29,8 +29,9 @@
/*************************************************************************/
#include "rasterizer_storage_gles3.h"
-#include "engine.h"
-#include "project_settings.h"
+
+#include "core/engine.h"
+#include "core/project_settings.h"
#include "rasterizer_canvas_gles3.h"
#include "rasterizer_scene_gles3.h"
@@ -1095,7 +1096,7 @@ Ref<Image> RasterizerStorageGLES3::texture_get_data(RID p_texture, int p_layer)
#else
ERR_EXPLAIN("Sorry, It's not possible to obtain images back in OpenGL ES");
- return Ref<Image>();
+ ERR_FAIL_V(Ref<Image>());
#endif
}
diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h
index b74dd77e26..33f0853d60 100644
--- a/drivers/gles3/rasterizer_storage_gles3.h
+++ b/drivers/gles3/rasterizer_storage_gles3.h
@@ -31,11 +31,12 @@
#ifndef RASTERIZERSTORAGEGLES3_H
#define RASTERIZERSTORAGEGLES3_H
-#include "self_list.h"
+#include "core/self_list.h"
#include "servers/visual/rasterizer.h"
#include "servers/visual/shader_language.h"
#include "shader_compiler_gles3.h"
#include "shader_gles3.h"
+
#include "shaders/blend_shape.glsl.gen.h"
#include "shaders/canvas.glsl.gen.h"
#include "shaders/copy.glsl.gen.h"
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp
index a78a392cbd..11c84e7db8 100644
--- a/drivers/gles3/shader_compiler_gles3.cpp
+++ b/drivers/gles3/shader_compiler_gles3.cpp
@@ -30,7 +30,7 @@
#include "shader_compiler_gles3.h"
-#include "os/os.h"
+#include "core/os/os.h"
#define SL ShaderLanguage
diff --git a/drivers/gles3/shader_compiler_gles3.h b/drivers/gles3/shader_compiler_gles3.h
index 7a32057741..1f903b8935 100644
--- a/drivers/gles3/shader_compiler_gles3.h
+++ b/drivers/gles3/shader_compiler_gles3.h
@@ -31,7 +31,7 @@
#ifndef SHADERCOMPILERGLES3_H
#define SHADERCOMPILERGLES3_H
-#include "pair.h"
+#include "core/pair.h"
#include "servers/visual/shader_language.h"
#include "servers/visual/shader_types.h"
#include "servers/visual_server.h"
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp
index 007600bb42..2a3b8a9b91 100644
--- a/drivers/gles3/shader_gles3.cpp
+++ b/drivers/gles3/shader_gles3.cpp
@@ -30,7 +30,7 @@
#include "shader_gles3.h"
-#include "print_string.h"
+#include "core/print_string.h"
//#define DEBUG_OPENGL
diff --git a/drivers/gles3/shader_gles3.h b/drivers/gles3/shader_gles3.h
index 996655615e..ca74317218 100644
--- a/drivers/gles3/shader_gles3.h
+++ b/drivers/gles3/shader_gles3.h
@@ -31,7 +31,10 @@
#ifndef SHADER_GLES3_H
#define SHADER_GLES3_H
-#include <stdio.h>
+#include "core/hash_map.h"
+#include "core/map.h"
+#include "core/math/camera_matrix.h"
+#include "core/variant.h"
#include "platform_config.h"
#ifndef GLES3_INCLUDE_H
@@ -40,10 +43,7 @@
#include GLES3_INCLUDE_H
#endif
-#include "camera_matrix.h"
-#include "hash_map.h"
-#include "map.h"
-#include "variant.h"
+#include <stdio.h>
/**
@author Juan Linietsky <reduzio@gmail.com>