diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-01-15 00:27:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-15 00:27:05 +0100 |
commit | a540e15cd1e0f81463fc40787386ee49d04f3ece (patch) | |
tree | ee7952f14279984e31c009e3632f0d8a36db7dd4 /drivers/gles2 | |
parent | a992d3f74f73ce4975abf9273aeaaa8909b78de1 (diff) | |
parent | aafaf2226fa9de01ddecded081fc1d44a51ba008 (diff) |
Merge pull request #7513 from djrm/compilation_fix
Matrix32 -> Transform2D
Diffstat (limited to 'drivers/gles2')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 20 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_gles2.h | 6 | ||||
-rw-r--r-- | drivers/gles2/shader_gles2.h | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index fd3e5e508e..760af5100c 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -7855,7 +7855,7 @@ void RasterizerGLES2::_debug_draw_shadow(GLuint tex, const Rect2& p_rect) { - Matrix32 modelview; + Transform2D modelview; modelview.translate(p_rect.pos.x, p_rect.pos.y); canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX, modelview); glBindTexture(GL_TEXTURE_2D,tex); @@ -8073,8 +8073,8 @@ void RasterizerGLES2::canvas_begin() { canvas_transform.scale( Vector3( 2.0f / viewport.width, csy * -2.0f / viewport.height, 1.0f ) ); canvas_shader.set_uniform(CanvasShaderGLES2::PROJECTION_MATRIX,canvas_transform); - canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX,Matrix32()); - canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Matrix32()); + canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX,Transform2D()); + canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Transform2D()); canvas_opacity=1.0; canvas_blend_mode=VS::MATERIAL_BLEND_MODE_MIX; @@ -8138,11 +8138,11 @@ void RasterizerGLES2::canvas_set_blend_mode(VS::MaterialBlendMode p_mode) { } -void RasterizerGLES2::canvas_begin_rect(const Matrix32& p_transform) { +void RasterizerGLES2::canvas_begin_rect(const Transform2D& p_transform) { canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX,p_transform); - canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Matrix32()); + canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Transform2D()); } @@ -8670,7 +8670,7 @@ void RasterizerGLES2::canvas_draw_polygon(int p_vertex_count, const int* p_indic }; -void RasterizerGLES2::canvas_set_transform(const Matrix32& p_transform) { +void RasterizerGLES2::canvas_set_transform(const Transform2D& p_transform) { canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,p_transform); @@ -8880,7 +8880,7 @@ RID RasterizerGLES2::canvas_light_shadow_buffer_create(int p_width) { return canvas_light_shadow_owner.make_rid(cls); } -void RasterizerGLES2::canvas_light_shadow_buffer_update(RID p_buffer, const Matrix32& p_light_xform, int p_light_mask,float p_near, float p_far, CanvasLightOccluderInstance* p_occluders, CameraMatrix *p_xform_cache) { +void RasterizerGLES2::canvas_light_shadow_buffer_update(RID p_buffer, const Transform2D& p_light_xform, int p_light_mask,float p_near, float p_far, CanvasLightOccluderInstance* p_occluders, CameraMatrix *p_xform_cache) { CanvasLightShadow *cls = canvas_light_shadow_owner.get(p_buffer); ERR_FAIL_COND(!cls); @@ -9602,7 +9602,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX,ci->final_transform); - canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Matrix32()); + canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Transform2D()); bool reclip=false; @@ -9715,7 +9715,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const } canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX,ci->final_transform); - canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Matrix32()); + canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Transform2D()); canvas_shader.set_uniform(CanvasShaderGLES2::PROJECTION_MATRIX,canvas_transform); if (canvas_use_modulate) canvas_shader.set_uniform(CanvasShaderGLES2::MODULATE,canvas_modulate); @@ -9782,7 +9782,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const } canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX,ci->final_transform); - canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Matrix32()); + canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Transform2D()); if (canvas_use_modulate) canvas_shader.set_uniform(CanvasShaderGLES2::MODULATE,canvas_modulate); diff --git a/drivers/gles2/rasterizer_gles2.h b/drivers/gles2/rasterizer_gles2.h index c6057bfd88..f04b035560 100644 --- a/drivers/gles2/rasterizer_gles2.h +++ b/drivers/gles2/rasterizer_gles2.h @@ -1630,7 +1630,7 @@ public: virtual void canvas_set_opacity(float p_opacity); virtual void canvas_set_blend_mode(VS::MaterialBlendMode p_mode); - virtual void canvas_begin_rect(const Matrix32& p_transform); + virtual void canvas_begin_rect(const Transform2D& p_transform); virtual void canvas_set_clip(bool p_clip, const Rect2& p_rect); virtual void canvas_end_rect(); virtual void canvas_draw_line(const Point2& p_from, const Point2& p_to,const Color& p_color,float p_width,bool p_antialiased); @@ -1638,7 +1638,7 @@ public: virtual void canvas_draw_style_box(const Rect2& p_rect, const Rect2& p_src_region, RID p_texture,const float *p_margins, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1)); virtual void canvas_draw_primitive(const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture,float p_width); virtual void canvas_draw_polygon(int p_vertex_count, const int* p_indices, const Vector2* p_vertices, const Vector2* p_uvs, const Color* p_colors,const RID& p_texture,bool p_singlecolor); - virtual void canvas_set_transform(const Matrix32& p_transform); + virtual void canvas_set_transform(const Transform2D& p_transform); virtual void canvas_render_items(CanvasItem *p_item_list,int p_z,const Color& p_modulate,CanvasLight *p_light); virtual void canvas_debug_viewport_shadows(CanvasLight* p_lights_with_shadow); @@ -1647,7 +1647,7 @@ public: //buffer virtual RID canvas_light_shadow_buffer_create(int p_width); - virtual void canvas_light_shadow_buffer_update(RID p_buffer, const Matrix32& p_light_xform, int p_light_mask,float p_near, float p_far, CanvasLightOccluderInstance* p_occluders, CameraMatrix *p_xform_cache); + virtual void canvas_light_shadow_buffer_update(RID p_buffer, const Transform2D& p_light_xform, int p_light_mask,float p_near, float p_far, CanvasLightOccluderInstance* p_occluders, CameraMatrix *p_xform_cache); //occluder virtual RID canvas_light_occluder_create(); diff --git a/drivers/gles2/shader_gles2.h b/drivers/gles2/shader_gles2.h index ea9958741a..509f9a82b4 100644 --- a/drivers/gles2/shader_gles2.h +++ b/drivers/gles2/shader_gles2.h @@ -213,7 +213,7 @@ private: case Variant::MATRIX32: { - Matrix32 tr=p_value; + Transform2D tr=p_value; GLfloat matrix[16]={ /* build a 16x16 matrix */ tr.elements[0][0], tr.elements[0][1], |