| 143 | } |
| 144 | |
| 145 | void OpenGLWrapper::DrawTriangle(Vector2D p1, Vector2D p2, Vector2D p3) const { |
| 146 | VertexArray buf(2, 3); |
| 147 | buf.Set(0, p1); |
| 148 | buf.Set(1, p2); |
| 149 | buf.Set(2, p3); |
| 150 | |
| 151 | // Fill |
| 152 | if (fill_a != 0.f) { |
| 153 | SetModeFill(); |
| 154 | buf.Draw(GL_TRIANGLES, false); |
| 155 | } |
| 156 | // Outline |
| 157 | if (line_a != 0.f) { |
| 158 | SetModeLine(); |
| 159 | buf.Draw(GL_LINE_LOOP); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | void OpenGLWrapper::DrawRing(Vector2D center, float r1, float r2, float ar, float arc_start, float arc_end) const { |
| 164 | if (r2 > r1) |