MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / Draw

Method Draw

src/visual/TuningContext.cpp:44–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void TuningContext::Draw(float r, float g, float b, float a, float p1, float p2) {
45 glEnable(GL_BLEND);
46 glBlendFunc(GL_ONE, GL_ONE);
47 glBegin(GL_QUADS);
48 glColor4f(r * 0.5, g * 0.5, b * 0.5, a);
49 glVertex2f(-1.0 + p2 * 2.0, 1.0);
50 glVertex2f(-1.0 + p1 * 2.0, 1.0);
51 glColor4f(r, g, b, a);
52 glVertex2f(-1.0 + p1 * 2.0, 0.0);
53 glVertex2f(-1.0 + p2 * 2.0, 0.0);
54
55 glVertex2f(-1.0 + p2 * 2.0, 0.0);
56 glVertex2f(-1.0 + p1 * 2.0, 0.0);
57 glColor4f(r * 0.5, g * 0.5, b * 0.5, a);
58 glVertex2f(-1.0 + p1 * 2.0, -1.0);
59 glVertex2f(-1.0 + p2 * 2.0, -1.0);
60 glEnd();
61 glDisable(GL_BLEND);
62}
63
64void TuningContext::DrawEnd() {
65// glFlush();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected