summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/graphics/image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules/asura-core/graphics/image.cpp')
-rw-r--r--source/modules/asura-core/graphics/image.cpp42
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