Browse Source

Merge pull request #49874 from groud/fix_polygon2D_rendering_black

Fix polygon 2D rendering black
Rémi Verschelde 4 years ago
parent
commit
8ccadfabf2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/2d/polygon_2d.cpp

+ 1 - 1
scene/2d/polygon_2d.cpp

@@ -365,7 +365,7 @@ void Polygon2D::_notification(int p_what) {
 				arr[RS::ARRAY_INDEX] = index_array;
 				arr[RS::ARRAY_INDEX] = index_array;
 
 
 				RS::get_singleton()->mesh_add_surface_from_arrays(mesh, RS::PRIMITIVE_TRIANGLES, arr, Array(), Dictionary(), RS::ARRAY_FLAG_USE_2D_VERTICES);
 				RS::get_singleton()->mesh_add_surface_from_arrays(mesh, RS::PRIMITIVE_TRIANGLES, arr, Array(), Dictionary(), RS::ARRAY_FLAG_USE_2D_VERTICES);
-				RS::get_singleton()->canvas_item_add_mesh(get_canvas_item(), mesh, Transform2D(), Color(), texture.is_valid() ? texture->get_rid() : RID());
+				RS::get_singleton()->canvas_item_add_mesh(get_canvas_item(), mesh, Transform2D(), Color(1, 1, 1), texture.is_valid() ? texture->get_rid() : RID());
 			}
 			}
 
 
 		} break;
 		} break;