mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
Improved the error message when a Canvas with the readable field explicitly set is not supported.
--HG-- branch : minor
This commit is contained in:
@@ -194,8 +194,11 @@ bool Canvas::loadVolatile()
|
|||||||
if (!Canvas::isFormatSupported(format, readable))
|
if (!Canvas::isFormatSupported(format, readable))
|
||||||
{
|
{
|
||||||
const char *fstr = "rgba8";
|
const char *fstr = "rgba8";
|
||||||
|
const char *readablestr = "";
|
||||||
|
if (readable != !isPixelFormatDepthStencil(format))
|
||||||
|
readablestr = readable ? " readable" : " non-readable";
|
||||||
love::getConstant(Canvas::getSizedFormat(format), fstr);
|
love::getConstant(Canvas::getSizedFormat(format), fstr);
|
||||||
throw love::Exception("The %s canvas format is not supported by your OpenGL drivers.", fstr);
|
throw love::Exception("The %s%s canvas format is not supported by your OpenGL drivers.", fstr, readablestr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (requestedSamples > 1 && texType != TEXTURE_2D)
|
if (requestedSamples > 1 && texType != TEXTURE_2D)
|
||||||
|
|||||||
Reference in New Issue
Block a user