From e1779897abf5fe092be152f2852b7580198eb3ad Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 14 Feb 2013 08:03:55 -0400 Subject: [PATCH] Removed love.graphics.drawTest --- src/modules/graphics/opengl/Graphics.cpp | 25 ------------------- src/modules/graphics/opengl/Graphics.h | 2 -- src/modules/graphics/opengl/wrap_Graphics.cpp | 15 ----------- src/modules/graphics/opengl/wrap_Graphics.h | 1 - 4 files changed, 43 deletions(-) diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index 7e2d18a91..ed6b64f17 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -1144,31 +1144,6 @@ void Graphics::shear(float kx, float ky) 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(); diff --git a/src/modules/graphics/opengl/Graphics.h b/src/modules/graphics/opengl/Graphics.h index d0635a8db..99602b4c3 100644 --- a/src/modules/graphics/opengl/Graphics.h +++ b/src/modules/graphics/opengl/Graphics.h @@ -511,8 +511,6 @@ public: 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: diff --git a/src/modules/graphics/opengl/wrap_Graphics.cpp b/src/modules/graphics/opengl/wrap_Graphics.cpp index 5051350a7..a5aa755e4 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.cpp +++ b/src/modules/graphics/opengl/wrap_Graphics.cpp @@ -956,20 +956,6 @@ int w_drawq(lua_State *L) return 0; } -int w_drawTest(lua_State *L) -{ - Image *image = luax_checktype(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); @@ -1327,7 +1313,6 @@ static const luaL_Reg functions[] = { "draw", w_draw }, { "drawq", w_drawq }, - { "drawTest", w_drawTest }, { "print", w_print }, { "printf", w_printf }, diff --git a/src/modules/graphics/opengl/wrap_Graphics.h b/src/modules/graphics/opengl/wrap_Graphics.h index 9175766f7..d11ac1552 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.h +++ b/src/modules/graphics/opengl/wrap_Graphics.h @@ -95,7 +95,6 @@ int w_getShader(lua_State *L); 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);