diff options
author | Daniel J. Ramirez <djrmuv@gmail.com> | 2017-01-13 01:34:32 -0600 |
---|---|---|
committer | Daniel J. Ramirez <djrmuv@gmail.com> | 2017-01-13 01:34:32 -0600 |
commit | aafaf2226fa9de01ddecded081fc1d44a51ba008 (patch) | |
tree | be0bb10b883b98f2b768992e7c6a7fe62f01d205 /drivers/gles2 | |
parent | a2903fc51d1d20eba4dc451bdacbe477d6670163 (diff) |
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 2673c79232..40866e0c90 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -7853,7 +7853,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); @@ -8071,8 +8071,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; @@ -8136,11 +8136,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()); } @@ -8668,7 +8668,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); @@ -8878,7 +8878,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); @@ -9603,7 +9603,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; @@ -9716,7 +9716,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); @@ -9783,7 +9783,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], |