Browse Source

Renamed love.graphics.getMaxImageSize to love.graphics.getMaxTextureSize (old function is still there, but deprecated.)

Alex Szpakowski 11 years ago
parent
commit
c64b3d2527

+ 1 - 1
src/modules/graphics/opengl/Graphics.cpp

@@ -316,7 +316,7 @@ void Graphics::discardStencil()
 	glDisable(GL_STENCIL_TEST);
 }
 
-int Graphics::getMaxImageSize() const
+int Graphics::getMaxTextureSize() const
 {
 	return gl.getMaxTextureSize();
 }

+ 2 - 3
src/modules/graphics/opengl/Graphics.h

@@ -187,10 +187,9 @@ public:
 	void discardStencil();
 
 	/**
-	 * Gets the maximum supported width or height of Images and Canvases on this
-	 * system.
+	 * Gets the maximum supported width or height of Textures on this system.
 	 **/
-	int getMaxImageSize() const;
+	int getMaxTextureSize() const;
 
 	/**
 	 * Creates an Image object with padding and/or optimization.

+ 6 - 3
src/modules/graphics/opengl/wrap_Graphics.cpp

@@ -135,9 +135,9 @@ int w_setInvertedStencil(lua_State *L)
 	return setStencil(L, true);
 }
 
-int w_getMaxImageSize(lua_State *L)
+int w_getMaxTextureSize(lua_State *L)
 {
-	lua_pushinteger(L, instance->getMaxImageSize());
+	lua_pushinteger(L, instance->getMaxTextureSize());
 	return 1;
 }
 
@@ -1339,7 +1339,7 @@ static const luaL_Reg functions[] =
 	{ "getPointSize", w_getPointSize },
 	{ "getPointStyle", w_getPointStyle },
 	{ "getMaxPointSize", w_getMaxPointSize },
-	{ "getMaxImageSize", w_getMaxImageSize },
+	{ "getMaxTextureSize", w_getMaxTextureSize },
 	{ "newScreenshot", w_newScreenshot },
 	{ "setCanvas", w_setCanvas },
 	{ "getCanvas", w_getCanvas },
@@ -1382,6 +1382,9 @@ static const luaL_Reg functions[] =
 	{ "shear", w_shear },
 	{ "origin", w_origin },
 
+	// Deprecated since 0.9.1.
+	{ "getMaxImageSize", w_getMaxTextureSize },
+
 	{ 0, 0 }
 };
 

+ 1 - 1
src/modules/graphics/opengl/wrap_Graphics.h

@@ -50,7 +50,7 @@ int w_setScissor(lua_State *L);
 int w_getScissor(lua_State *L);
 int w_setStencil(lua_State *L);
 int w_setInvertedStencil(lua_State *L);
-int w_getMaxImageSize(lua_State *L);
+int w_getMaxTextureSize(lua_State *L);
 int w_newImage(lua_State *L);
 int w_newQuad(lua_State *L);
 int w_newFont(lua_State *L);