Commits

Alex Szpakowski  committed 45f6e27

love.graphics.newParticleSystem now uses a default buffer size of 1000 (issue #598)

  • Participants
  • Parent commits 8db3971

Comments (0)

Files changed (2)

File src/modules/graphics/opengl/Shader.cpp

 	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)

File src/modules/graphics/opengl/wrap_Graphics.cpp

 
 int w_setIcon(lua_State *L)
 {
-	Image *image = luax_checktype<Image>(L, 1, "Image", GRAPHICS_IMAGE_T);
+	Image *image = luax_checkimage(L, 1);
 	try
 	{
 		instance->setIcon(image);
 
 int w_newSpriteBatch(lua_State *L)
 {
-	Image *image = luax_checktype<Image>(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)
 
 int w_newParticleSystem(lua_State *L)
 {
-	Image *image = luax_checktype<Image>(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;