summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_canvas_gles3.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/rasterizer_canvas_gles3.h')
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.h b/drivers/gles3/rasterizer_canvas_gles3.h
index 2da0cc0afd..5859820364 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.h
+++ b/drivers/gles3/rasterizer_canvas_gles3.h
@@ -32,14 +32,14 @@
#include "rasterizer_storage_gles3.h"
#include "servers/visual/rasterizer.h"
-#include "shaders/canvas_shadow.glsl.h"
+#include "shaders/canvas_shadow.glsl.gen.h"
class RasterizerCanvasGLES3 : public RasterizerCanvas {
public:
struct CanvasItemUBO {
float projection_matrix[16];
- float time[4];
+ float time;
};
struct Data {
@@ -51,6 +51,10 @@ public:
GLuint polygon_buffer_quad_arrays[4];
GLuint polygon_buffer_pointer_array;
GLuint polygon_index_buffer;
+
+ GLuint particle_quad_vertices;
+ GLuint particle_quad_array;
+
uint32_t polygon_buffer_size;
} data;
@@ -63,8 +67,10 @@ public:
CanvasShadowShaderGLES3 canvas_shadow_shader;
bool using_texture_rect;
+ bool using_ninepatch;
RID current_tex;
+ RID current_normal;
RasterizerStorageGLES3::Texture *current_tex_ptr;
Transform vp;
@@ -106,8 +112,8 @@ public:
virtual void canvas_begin();
virtual void canvas_end();
- _FORCE_INLINE_ void _set_texture_rect_mode(bool p_enable);
- _FORCE_INLINE_ RasterizerStorageGLES3::Texture *_bind_canvas_texture(const RID &p_texture);
+ _FORCE_INLINE_ void _set_texture_rect_mode(bool p_enable, bool p_ninepatch = false);
+ _FORCE_INLINE_ RasterizerStorageGLES3::Texture *_bind_canvas_texture(const RID &p_texture, const RID &p_normal_map);
_FORCE_INLINE_ void _draw_gui_primitive(int p_points, const Vector2 *p_vertices, const Color *p_colors, const Vector2 *p_uvs);
_FORCE_INLINE_ void _draw_polygon(const int *p_indices, int p_index_count, int p_vertex_count, const Vector2 *p_vertices, const Vector2 *p_uvs, const Color *p_colors, bool p_singlecolor);