diff options
author | chai <chaifix@163.com> | 2018-09-09 00:34:03 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-09-09 00:34:03 +0800 |
commit | e96eb0f4fb30f2781223a966e2a2deb597a9d1d2 (patch) | |
tree | 5bfdf917d1ad0ebc27ca1f8ae4cf37a286e9afff /src/libjin/Graphics/Shapes.cpp | |
parent | 081edca50b4d4fda365c09fad1e013c8467fb648 (diff) |
*update
Diffstat (limited to 'src/libjin/Graphics/Shapes.cpp')
-rw-r--r-- | src/libjin/Graphics/Shapes.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/libjin/Graphics/Shapes.cpp b/src/libjin/Graphics/Shapes.cpp index f4c5093..13935d2 100644 --- a/src/libjin/Graphics/Shapes.cpp +++ b/src/libjin/Graphics/Shapes.cpp @@ -14,20 +14,14 @@ namespace graphics void point(int x, int y) { float vers[] = { x + 0.5f , y + 0.5f }; - glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 0, (GLvoid*)vers); glDrawArrays(GL_POINTS, 0, 1); - glDisableClientState(GL_VERTEX_ARRAY); } void points(int n, GLshort* p) { - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(2, GL_SHORT, 0, (GLvoid*)p); glDrawArrays(GL_POINTS, 0, n); - - glDisableClientState(GL_VERTEX_ARRAY); } void line(int x1, int y1, int x2, int y2) @@ -37,10 +31,8 @@ namespace graphics x2, y2 }; - glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 0, (GLvoid*)verts); glDrawArrays(GL_LINES, 0, 2); - glDisableClientState(GL_VERTEX_ARRAY); } void circle(RenderMode mode, int x, int y, int r) @@ -92,10 +84,8 @@ namespace graphics verts[i * 4 + 3] = p[(i + 1) % count * 2 + 1]; } - glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 0, (GLvoid*)verts); glDrawArrays(GL_LINES, 0, count * 2); - glDisableClientState(GL_VERTEX_ARRAY); delete[] verts; } @@ -108,10 +98,8 @@ namespace graphics } else if (mode == FILL) { - glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 0, (const GLvoid*)p); glDrawArrays(GL_POLYGON, 0, count); - glDisableClientState(GL_VERTEX_ARRAY); } } |