diff options
author | chai <chaifix@163.com> | 2019-04-13 20:15:07 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-04-13 20:15:07 +0800 |
commit | 866e00474be3bfe0e7dac73b720af0b9ebf7109a (patch) | |
tree | 36c44e99352e2d582b4f2f1dbd4e9e672a54f2cf /source/modules/asura-core/graphics/image.cpp | |
parent | b5b43bac50ad58949e70bcd1a34b1e6c4765fd51 (diff) |
*misc
Diffstat (limited to 'source/modules/asura-core/graphics/image.cpp')
-rw-r--r-- | source/modules/asura-core/graphics/image.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/source/modules/asura-core/graphics/image.cpp b/source/modules/asura-core/graphics/image.cpp index 9244e73..ad2ae9a 100644 --- a/source/modules/asura-core/graphics/image.cpp +++ b/source/modules/asura-core/graphics/image.cpp @@ -99,48 +99,6 @@ namespace AsuraEngine { return mHeight; } - /* - void Image::Render() - { - Shader* shader = gl.GetShader(); - if (!shader) - return; - uint32& w = mWidth, &h = mHeight; - int vertices[] = { - 0, 0, 0, 0, - 0, h, 0, 1, - w, 0, 1, 0, - w, h, 1, 1, - }; - // öϵUV - shader->SetAttribPosition(2, GL_INT, GL_FALSE, 4 * sizeof(int), vertices); - shader->SetAttribTexcoord0(2, GL_INT, GL_FALSE, 4 * sizeof(int), &vertices[2]); - gl.DrawArrays(GL_TRIANGLE_STRIP, 0, 4); - } - void Image::Render(AEMath::Recti& quad) - { - // - Shader* shader = gl.GetShader(); - if (!shader) - return; - int &w = quad.w, &h = quad.h; - // UV - float l = quad.x / mWidth, - r = (quad.x + quad.w) / mWidth, - t = quad.y / mHeight, - b = (quad.y + quad.h) / mHeight; - float vertices[] = { - 0, 0, l, t, - 0, h, l, b, - w, 0, r, t, - w, h, r, b, - }; - // öϵUV - shader->SetAttribPosition(2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), vertices); - shader->SetAttribTexcoord0(2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), &vertices[2]); - gl.DrawArrays(GL_TRIANGLE_STRIP, 0, 4); - } - */ } }
\ No newline at end of file |