mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Replaced internal calls to luaL_register (deprecated in Lua 5.2) with an alternative
This commit is contained in:
@@ -744,6 +744,8 @@ Image::Wrap Canvas::getWrap() const
|
||||
|
||||
bool Canvas::loadVolatile()
|
||||
{
|
||||
fbo = depth_stencil = img = 0;
|
||||
|
||||
// glTexImage2D is guaranteed to error in this case.
|
||||
if (width > gl.getMaxTextureSize() || height > gl.getMaxTextureSize())
|
||||
{
|
||||
@@ -764,6 +766,7 @@ bool Canvas::loadVolatile()
|
||||
void Canvas::unloadVolatile()
|
||||
{
|
||||
strategy->deleteFBO(fbo, depth_stencil, img);
|
||||
fbo = depth_stencil = img = 0;
|
||||
|
||||
for (size_t i = 0; i < attachedCanvases.size(); i++)
|
||||
attachedCanvases[i]->release();
|
||||
|
||||
Reference in New Issue
Block a user