Expose option to flip TextureData on load;

This commit is contained in:
bjorn 2019-01-04 21:51:20 -08:00
parent ed71485fcc
commit cc88a0b919
1 changed files with 2 additions and 1 deletions

View File

@ -105,7 +105,8 @@ static int l_lovrDataNewTextureData(lua_State* L) {
textureData = lovrTextureDataCreate(width, height, 0x0, format);
} else {
Blob* blob = luax_readblob(L, 1, "Texture");
textureData = lovrTextureDataCreateFromBlob(blob, true);
bool flip = lua_isnoneornil(L, 2) ? true : lua_toboolean(L, 2);
textureData = lovrTextureDataCreateFromBlob(blob, flip);
lovrRelease(blob);
}