summaryrefslogtreecommitdiff
path: root/drivers/gles3/effects
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2022-10-12 17:55:01 -0700
committerclayjohn <claynjohn@gmail.com>2022-10-12 17:55:01 -0700
commite600fb93a5e5cb6bdbc496393f9d96dd9a664292 (patch)
treeda2ec2d73610664662697fa1a354227e186bebf6 /drivers/gles3/effects
parent1baefceababe8a0d63434a231c3799555a45d8e3 (diff)
Add 2D lights to OpenGL3 canvas renderer
This is an initial implementation using the same single-pass approach as the RenderingDevice.
Diffstat (limited to 'drivers/gles3/effects')
-rw-r--r--drivers/gles3/effects/copy_effects.cpp2
-rw-r--r--drivers/gles3/effects/copy_effects.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gles3/effects/copy_effects.cpp b/drivers/gles3/effects/copy_effects.cpp
index de0181f887..92c29a4264 100644
--- a/drivers/gles3/effects/copy_effects.cpp
+++ b/drivers/gles3/effects/copy_effects.cpp
@@ -114,7 +114,7 @@ CopyEffects::~CopyEffects() {
copy.shader.version_free(copy.shader_version);
}
-void CopyEffects::copy_to_rect(const Rect2i &p_rect) {
+void CopyEffects::copy_to_rect(const Rect2 &p_rect) {
copy.shader.version_bind_shader(copy.shader_version, CopyShaderGLES3::MODE_COPY_SECTION);
copy.shader.version_set_uniform(CopyShaderGLES3::COPY_SECTION, p_rect.position.x, p_rect.position.y, p_rect.size.x, p_rect.size.y, copy.shader_version, CopyShaderGLES3::MODE_COPY_SECTION);
glBindVertexArray(quad_array);
diff --git a/drivers/gles3/effects/copy_effects.h b/drivers/gles3/effects/copy_effects.h
index b863e76579..7f16b4e0f3 100644
--- a/drivers/gles3/effects/copy_effects.h
+++ b/drivers/gles3/effects/copy_effects.h
@@ -61,7 +61,7 @@ public:
~CopyEffects();
// These functions assume that a framebuffer and texture are bound already. They only manage the shader, uniforms, and vertex array.
- void copy_to_rect(const Rect2i &p_rect);
+ void copy_to_rect(const Rect2 &p_rect);
void copy_screen();
void bilinear_blur(GLuint p_source_texture, int p_mipmap_count, const Rect2i &p_region);
void set_color(const Color &p_color, const Rect2i &p_region);