added color attribute and scissor clipping. Added debug callback to OpenGL messages

This commit is contained in:
2017-01-24 20:05:19 +00:00
parent 5268f65777
commit 9d6171c7d8
5 changed files with 86 additions and 26 deletions

View File

@@ -36,11 +36,13 @@ void Shape::draw_fill() const
{
glBindVertexArray(arrays[0]);
glDrawElements(GL_TRIANGLES, count[0], GL_UNSIGNED_SHORT, ioff[0]);
glBindVertexArray(0);
}
void Shape::draw_stroke() const
{
glBindVertexArray(arrays[1]);
glDrawElements(GL_LINES, count[1], GL_UNSIGNED_SHORT, ioff[1]);
glBindVertexArray(0);
}
bool Rect::create(float w, float h)