mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Use *ARB versions for VBOs in SpriteBatch. Throw error if SpriteBatch not
supported. Prettier overloading of SpriteBatch:add[q]().
This commit is contained in:
@@ -507,7 +507,14 @@ namespace opengl
|
||||
|
||||
SpriteBatch * Graphics::newSpriteBatch(Image * image, int size, int usage)
|
||||
{
|
||||
return new SpriteBatch(image, size, usage);
|
||||
SpriteBatch * t = NULL;
|
||||
try {
|
||||
t = new SpriteBatch(image, size, usage);
|
||||
} catch (love::Exception& e) {
|
||||
if (t) delete t;
|
||||
throw e;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
ParticleSystem * Graphics::newParticleSystem(Image * image, int size)
|
||||
|
||||
Reference in New Issue
Block a user