diff options
Diffstat (limited to 'servers/visual_server.cpp')
-rw-r--r-- | servers/visual_server.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index aed2f243fd..dacf04f8d6 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -339,7 +339,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ if (i == 0) { - aabb = Rect2(src[i], Vector2()); + aabb = Rect2(src[i], Vector2(0.00001, 0.00001)); //must have a bit of size } else { aabb.expand_to(src[i]); @@ -355,7 +355,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ if (i == 0) { - aabb = Rect2(src[i], Vector2()); + aabb = Rect2(src[i], Vector2(0.00001, 0.00001)); //must have a bit of size } else { aabb.expand_to(src[i]); @@ -385,7 +385,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ if (i == 0) { - aabb = Rect3(src[i], Vector3()); + aabb = Rect3(src[i], Vector3(0.00001, 0.00001, 0.00001)); } else { aabb.expand_to(src[i]); @@ -401,7 +401,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ if (i == 0) { - aabb = Rect3(src[i], Vector3()); + aabb = Rect3(src[i], Vector3(0.00001, 0.00001, 0.00001)); } else { aabb.expand_to(src[i]); @@ -735,6 +735,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ //first bptr[idx] = Rect3(); bptr[idx].position = v; + bptr[idx].size = Vector3(0.00001, 0.00001, 0.00001); //must have at least a bit of size any_valid = true; } else { bptr[idx].expand_to(v); @@ -1439,12 +1440,12 @@ Array VisualServer::mesh_surface_get_arrays(RID p_mesh, int p_surface) const { void VisualServer::_bind_methods() { ClassDB::bind_method(D_METHOD("texture_create"), &VisualServer::texture_create); - ClassDB::bind_method(D_METHOD("texture_create_from_image", "image:Image", "flags"), &VisualServer::texture_create_from_image, DEFVAL(TEXTURE_FLAGS_DEFAULT)); + ClassDB::bind_method(D_METHOD("texture_create_from_image", "image", "flags"), &VisualServer::texture_create_from_image, DEFVAL(TEXTURE_FLAGS_DEFAULT)); //ClassDB::bind_method(D_METHOD("texture_allocate"),&VisualServer::texture_allocate,DEFVAL( TEXTURE_FLAGS_DEFAULT ) ); //ClassDB::bind_method(D_METHOD("texture_set_data"),&VisualServer::texture_blit_rect,DEFVAL( CUBEMAP_LEFT ) ); //ClassDB::bind_method(D_METHOD("texture_get_rect"),&VisualServer::texture_get_rect ); - ClassDB::bind_method(D_METHOD("texture_set_flags", "texture"), &VisualServer::texture_set_flags); - ClassDB::bind_method(D_METHOD("texture_get_flags", "texture", "flags"), &VisualServer::texture_get_flags); + ClassDB::bind_method(D_METHOD("texture_set_flags", "texture", "flags"), &VisualServer::texture_set_flags); + ClassDB::bind_method(D_METHOD("texture_get_flags", "texture"), &VisualServer::texture_get_flags); ClassDB::bind_method(D_METHOD("texture_get_width", "texture"), &VisualServer::texture_get_width); ClassDB::bind_method(D_METHOD("texture_get_height", "texture"), &VisualServer::texture_get_height); |