mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Improved error messages when canvas/image creation fails because the size is too big for the system
This commit is contained in:
@@ -704,6 +704,10 @@ Image::Wrap Canvas::getWrap() const
|
||||
|
||||
bool Canvas::loadVolatile()
|
||||
{
|
||||
// glTexImage2D is guaranteed to error in this case.
|
||||
if (width > gl.getMaxTextureSize() || height > gl.getMaxTextureSize())
|
||||
return false;
|
||||
|
||||
status = strategy->createFBO(fbo, img, width, height, texture_type);
|
||||
if (status != GL_FRAMEBUFFER_COMPLETE)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user