MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / DrawTriangle

Method DrawTriangle

src/gl_wrap.cpp:145–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void 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
163void OpenGLWrapper::DrawRing(Vector2D center, float r1, float r2, float ar, float arc_start, float arc_end) const {
164 if (r2 > r1)

Callers 2

DrawMethod · 0.80
DrawMethod · 0.80

Calls 2

SetMethod · 0.45
DrawMethod · 0.45

Tested by

no test coverage detected