Use *ARB versions for VBOs in SpriteBatch. Throw error if SpriteBatch not

supported. Prettier overloading of SpriteBatch:add[q]().
This commit is contained in:
vrld
2011-07-05 16:06:14 +02:00
parent dd143c76ac
commit 6ea187b2f1
5 changed files with 90 additions and 62 deletions
+8 -1
View File
@@ -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)