add line drawing
This commit is contained in:
@ -548,3 +548,13 @@ void finally_draw_command(DeferredCommandDraw command) {
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
||||
void render_line(const LinePrimitive *line) {
|
||||
finally_use_2d_pipeline();
|
||||
glBegin(GL_LINES);
|
||||
glColor4b(line->color.r, line->color.g, line->color.b, line->color.a);
|
||||
glVertex2f(line->start.x, line->start.y);
|
||||
glColor4b(line->color.r, line->color.g, line->color.b, line->color.a);
|
||||
glVertex2f(line->finish.x, line->finish.y);
|
||||
glEnd();
|
||||
}
|
||||
|
Reference in New Issue
Block a user