mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Merge branch '12.0' into GraphicsBuffer
This commit is contained in:
@@ -20,8 +20,7 @@
|
||||
|
||||
// LOVE
|
||||
#include "wrap_Mesh.h"
|
||||
#include "Image.h"
|
||||
#include "Canvas.h"
|
||||
#include "Texture.h"
|
||||
#include "wrap_Texture.h"
|
||||
|
||||
// C++
|
||||
@@ -615,14 +614,7 @@ int w_Mesh_getTexture(lua_State *L)
|
||||
if (tex == nullptr)
|
||||
return 0;
|
||||
|
||||
// FIXME: big hack right here.
|
||||
if (dynamic_cast<Image *>(tex) != nullptr)
|
||||
luax_pushtype(L, Image::type, tex);
|
||||
else if (dynamic_cast<Canvas *>(tex) != nullptr)
|
||||
luax_pushtype(L, Canvas::type, tex);
|
||||
else
|
||||
return luaL_error(L, "Unable to determine texture type.");
|
||||
|
||||
luax_pushtype(L, tex);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user