Commits

Alex Szpakowski committed 2beaaa8

Removed love.graphics.drawTest

  • Participants
  • Parent commits 44ff8d2

Comments (0)

Files changed (4)

src/modules/graphics/opengl/Graphics.cpp

 	glMultMatrixf((const GLfloat *)t.getElements());
 }
 
-void Graphics::drawTest(Image *image, float x, float y, float a, float sx, float sy, float ox, float oy)
-{
-	image->bind();
-
-	// Buffer for transforming the image.
-	vertex buf[4];
-
-	Matrix t;
-	t.translate(x, y);
-	t.rotate(a);
-	t.scale(sx, sy);
-	t.translate(ox, oy);
-	t.transform(buf, image->getVertices(), 4);
-
-	const vertex *vertices = image->getVertices();
-
-	glEnableClientState(GL_VERTEX_ARRAY);
-	glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-	glVertexPointer(2, GL_FLOAT, sizeof(vertex), (GLvoid *)&buf[0].x);
-	glTexCoordPointer(2, GL_FLOAT, sizeof(vertex), (GLvoid *)&vertices[0].s);
-	glDrawArrays(GL_QUADS, 0, 4);
-	glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-	glDisableClientState(GL_VERTEX_ARRAY);
-}
-
 bool Graphics::hasFocus()
 {
 	return currentWindow->hasFocus();

src/modules/graphics/opengl/Graphics.h

 	void translate(float x, float y);
 	void shear(float kx, float ky);
 
-	void drawTest(Image *image, float x, float y, float a, float sx, float sy, float ox, float oy);
-
 	bool hasFocus();
 private:
 

src/modules/graphics/opengl/wrap_Graphics.cpp

 	return 0;
 }
 
-int w_drawTest(lua_State *L)
-{
-	Image *image = luax_checktype<Image>(L, 1, "Image", GRAPHICS_IMAGE_T);
-	float x = (float)luaL_optnumber(L, 2, 0.0f);
-	float y = (float)luaL_optnumber(L, 3, 0.0f);
-	float angle = (float)luaL_optnumber(L, 4, 0.0f);
-	float sx = (float)luaL_optnumber(L, 5, 1.0f);
-	float sy = (float)luaL_optnumber(L, 6, sx);
-	float ox = (float)luaL_optnumber(L, 7, 0);
-	float oy = (float)luaL_optnumber(L, 8, 0);
-	instance->drawTest(image, x, y, angle, sx, sy, ox, oy);
-	return 0;
-}
-
 int w_print(lua_State *L)
 {
 	const char *str = luaL_checkstring(L, 1);
 
 	{ "draw", w_draw },
 	{ "drawq", w_drawq },
-	{ "drawTest", w_drawTest },
 
 	{ "print", w_print },
 	{ "printf", w_printf },

src/modules/graphics/opengl/wrap_Graphics.h

 int w_isSupported(lua_State *L);
 int w_draw(lua_State *L);
 int w_drawq(lua_State *L);
-int w_drawTest(lua_State *L);
 int w_print(lua_State *L);
 int w_printf(lua_State *L);
 int w_point(lua_State *L);