aboutsummaryrefslogtreecommitdiff
path: root/src/lua/graphics/luaopen_graphics.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-07-25 20:27:55 +0800
committerchai <chaifix@163.com>2018-07-25 20:27:55 +0800
commit0371f99359d1f58dbec6353234c2b1ebd86a7585 (patch)
tree59da821f194dd067e8bf196ebe422712cd975346 /src/lua/graphics/luaopen_graphics.cpp
parent128b6dd3e3a803e475ec03493ee26e6b20d7e42b (diff)
*image->texture
Diffstat (limited to 'src/lua/graphics/luaopen_graphics.cpp')
-rw-r--r--src/lua/graphics/luaopen_graphics.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua/graphics/luaopen_graphics.cpp b/src/lua/graphics/luaopen_graphics.cpp
index 44b0a2c..be40247 100644
--- a/src/lua/graphics/luaopen_graphics.cpp
+++ b/src/lua/graphics/luaopen_graphics.cpp
@@ -72,7 +72,7 @@ namespace lua
fs->read(f, &b);
Proxy* proxy = (Proxy*)luax_newinstance(L, TYPE_IMAGE, sizeof(Proxy));
- Image* img = Image::createImage(b.data, b.size);
+ Texture* img = Texture::createTexture(b.data, b.size);
proxy->bind(img);
return 1;
}
@@ -142,8 +142,8 @@ namespace lua
if (luax_istype(L, 1, TYPE_IMAGE))
{
Proxy* proxy = (Proxy*)luax_toudata(L, 1);
- Image* img = (Image*)proxy->object;
- img->draw(x, y, sx, sy, r);
+ Texture* tex = (Texture*)proxy->object;
+ tex->draw(x, y, sx, sy, r);
}
else if (luax_istype(L, 1, TYPE_CANVAS))
{