Removal of Image from Variant, converted to a Resource.

This commit is contained in:
Juan Linietsky 2017-05-17 07:36:47 -03:00
parent d801ff2b3d
commit 98a3296702
110 changed files with 690 additions and 3203 deletions

View file

@ -82,7 +82,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
Image image(32, 2, 0, Image::FORMAT_LA8, pixels);
Ref<Image> image = memnew(Image(32, 2, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_SEGMENT].image = vs->texture_create_from_image(image);
@ -109,7 +109,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
Image image(32, 32, 0, Image::FORMAT_LA8, pixels);
Ref<Image> image = memnew(Image(32, 32, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_CIRCLE].image = vs->texture_create_from_image(image);
@ -136,7 +136,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
Image image(32, 32, 0, Image::FORMAT_LA8, pixels);
Ref<Image> image = memnew(Image(32, 32, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_RECTANGLE].image = vs->texture_create_from_image(image);
@ -164,7 +164,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
Image image(32, 64, 0, Image::FORMAT_LA8, pixels);
Ref<Image> image = memnew(Image(32, 64, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_CAPSULE].image = vs->texture_create_from_image(image);
@ -178,7 +178,7 @@ class TestPhysics2DMainLoop : public MainLoop {
{
Image image(convex_png);
Ref<Image> image = memnew(Image(convex_png));
body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].image = vs->texture_create_from_image(image);