From c7ebb50b70e61b34deae7fbe49e0b4a918309495 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 8 May 2013 17:19:25 -0300 Subject: [PATCH] love.graphics.newParticleSystem now uses a default buffer size of 1000 (issue #598) --- src/modules/graphics/opengl/Shader.cpp | 2 +- src/modules/graphics/opengl/wrap_Graphics.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/graphics/opengl/Shader.cpp b/src/modules/graphics/opengl/Shader.cpp index f5af80188..d391be507 100644 --- a/src/modules/graphics/opengl/Shader.cpp +++ b/src/modules/graphics/opengl/Shader.cpp @@ -593,7 +593,7 @@ std::string Shader::getGLSLVersion() const char *tmp = 0; // GL_SHADING_LANGUAGE_VERSION isn't available in OpenGL < 2.0. - if (GL_VERSION_2_0) + if (GL_VERSION_2_0 || GLEE_ARB_shading_language_100) tmp = (const char *) glGetString(GL_SHADING_LANGUAGE_VERSION); if (tmp == 0) diff --git a/src/modules/graphics/opengl/wrap_Graphics.cpp b/src/modules/graphics/opengl/wrap_Graphics.cpp index 018fe1541..fbff81b55 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.cpp +++ b/src/modules/graphics/opengl/wrap_Graphics.cpp @@ -157,7 +157,7 @@ int w_present(lua_State *) int w_setIcon(lua_State *L) { - Image *image = luax_checktype(L, 1, "Image", GRAPHICS_IMAGE_T); + Image *image = luax_checkimage(L, 1); try { instance->setIcon(image); @@ -543,7 +543,7 @@ int w_newImageFont(lua_State *L) int w_newSpriteBatch(lua_State *L) { - Image *image = luax_checktype(L, 1, "Image", GRAPHICS_IMAGE_T); + Image *image = luax_checkimage(L, 1); int size = luaL_optint(L, 2, 1000); SpriteBatch::UsageHint usage = SpriteBatch::USAGE_DYNAMIC; if (lua_gettop(L) > 2) @@ -566,8 +566,8 @@ int w_newSpriteBatch(lua_State *L) int w_newParticleSystem(lua_State *L) { - Image *image = luax_checktype(L, 1, "Image", GRAPHICS_IMAGE_T); - int size = luaL_checkint(L, 2); + Image *image = luax_checkimage(L, 1); + int size = luaL_optint(L, 2, 1000); ParticleSystem *t = instance->newParticleSystem(image, size); luax_newtype(L, "ParticleSystem", GRAPHICS_PARTICLE_SYSTEM_T, (void *)t); return 1;