From 4b3e7accd4c99a762a89dc55a6d47ddc508419ef Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 24 Feb 2022 12:45:21 +0100 Subject: [PATCH] Add some notes. --- world/default/terrain_2d_chunk_default.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/world/default/terrain_2d_chunk_default.cpp b/world/default/terrain_2d_chunk_default.cpp index 73ba74a..e5cf679 100644 --- a/world/default/terrain_2d_chunk_default.cpp +++ b/world/default/terrain_2d_chunk_default.cpp @@ -695,7 +695,8 @@ void Terrain2DChunkDefault::_draw() { if (terrain_mesh_rid != RID()) { RID terrain_texture_rid = mesh_rid_get(MESH_INDEX_TERRAIN, MESH_TYPE_INDEX_TEXTURE_RID); - VisualServer::get_singleton()->canvas_item_add_mesh(world->get_canvas_item(), terrain_mesh_rid, get_transform(), Color(1, 1, 1, 1), terrain_texture_rid, RID()); + //Note: the transform parameter is not implemented in gles2 + VisualServer::get_singleton()->canvas_item_add_mesh(world->get_canvas_item(), terrain_mesh_rid, Transform2D(), Color(1, 1, 1, 1), terrain_texture_rid, RID()); } RID liquid_mesh_rid = mesh_rid_get(MESH_INDEX_LIQUID, MESH_TYPE_INDEX_MESH); @@ -703,7 +704,8 @@ void Terrain2DChunkDefault::_draw() { if (liquid_mesh_rid != RID()) { RID liquid_texture_rid = mesh_rid_get(MESH_INDEX_LIQUID, MESH_TYPE_INDEX_TEXTURE_RID); - VisualServer::get_singleton()->canvas_item_add_mesh(world->get_canvas_item(), liquid_mesh_rid, get_transform(), Color(1, 1, 1, 1), liquid_texture_rid, RID()); + //Note: the transform parameter is not implemented in gles2 + VisualServer::get_singleton()->canvas_item_add_mesh(world->get_canvas_item(), liquid_mesh_rid, Transform2D(), Color(1, 1, 1, 1), liquid_texture_rid, RID()); } RID prop_mesh_rid = mesh_rid_get(MESH_INDEX_PROP, MESH_TYPE_INDEX_MESH); @@ -711,7 +713,8 @@ void Terrain2DChunkDefault::_draw() { if (prop_mesh_rid != RID()) { RID prop_texture_rid = mesh_rid_get(MESH_INDEX_PROP, MESH_TYPE_INDEX_TEXTURE_RID); - VisualServer::get_singleton()->canvas_item_add_mesh(world->get_canvas_item(), prop_mesh_rid, get_transform(), Color(1, 1, 1, 1), prop_texture_rid, RID()); + //Note: the transform parameter is not implemented in gles2 + VisualServer::get_singleton()->canvas_item_add_mesh(world->get_canvas_item(), prop_mesh_rid, Transform2D(), Color(1, 1, 1, 1), prop_texture_rid, RID()); } }