mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Add SpriteBatch support to love.graphics.isSupported
This commit is contained in:
@@ -70,6 +70,11 @@ namespace opengl
|
||||
delete color;
|
||||
}
|
||||
|
||||
bool SpriteBatch::isSupported()
|
||||
{
|
||||
return (GLEE_ARB_vertex_buffer_object || GLEE_VERSION_1_5);
|
||||
}
|
||||
|
||||
bool SpriteBatch::loadVolatile()
|
||||
{
|
||||
// Find out which OpenGL VBO usage hint to use.
|
||||
|
||||
@@ -90,6 +90,8 @@ namespace opengl
|
||||
SpriteBatch(Image * image, int size, int usage);
|
||||
virtual ~SpriteBatch();
|
||||
|
||||
static bool isSupported();
|
||||
|
||||
// Implements Volatile.
|
||||
bool loadVolatile();
|
||||
void unloadVolatile();
|
||||
|
||||
@@ -761,6 +761,10 @@ namespace opengl
|
||||
if (!PixelEffect::isSupported())
|
||||
supported = false;
|
||||
break;
|
||||
case Graphics::SUPPORT_SPRITEBATCHES:
|
||||
if (!SpriteBatch::isSupported())
|
||||
supported = false;
|
||||
break;
|
||||
default:
|
||||
supported = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user