diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/rasterizer.cpp | 3 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/servers/visual/rasterizer.cpp b/servers/visual/rasterizer.cpp index 32f5b80e55..a4b91e17fe 100644 --- a/servers/visual/rasterizer.cpp +++ b/servers/visual/rasterizer.cpp @@ -290,9 +290,6 @@ RID Rasterizer::_create_shader(const FixedMaterialShaderKey& p_key) { //print_line("**VERTEX SHADER GENERATED code: \n"+vcode); - double tf = (OS::get_singleton()->get_ticks_usec()-t)/1000.0; -// print_line("generate: "+rtos(tf)); - shader_set_code(fms.shader,vcode,code,lcode,0,0); fixed_material_shaders[p_key]=fms; diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index f7614ac080..8d228ad859 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -7534,10 +7534,10 @@ void VisualServerRaster::_draw_cursors_and_margins() { ERR_CONTINUE( !tex ); if (cursors[i].region.has_no_area()) { Point2 size(texture_get_width(tex), texture_get_height(tex)); - rasterizer->canvas_draw_rect(Rect2(cursors[i].pos, size), 0, Rect2(), tex, Color(1, 1, 1, 1)); + rasterizer->canvas_draw_rect(Rect2(cursors[i].pos-cursors[i].center, size), 0, Rect2(), tex, Color(1, 1, 1, 1)); } else { Point2 size = cursors[i].region.size; - rasterizer->canvas_draw_rect(Rect2(cursors[i].pos, size), Rasterizer::CANVAS_RECT_REGION, cursors[i].region, tex, Color(1, 1, 1, 1)); + rasterizer->canvas_draw_rect(Rect2(cursors[i].pos-cursors[i].center, size), Rasterizer::CANVAS_RECT_REGION, cursors[i].region, tex, Color(1, 1, 1, 1)); } }; |