From face1cf98329be2800b1fae1714d3c457af28709 Mon Sep 17 00:00:00 2001 From: Delio Brignoli Date: Sat, 16 Sep 2017 17:57:43 +0100 Subject: [PATCH] ssd1306: fix background painting - Take pixel size into account. - Fix swapped coordinates passed to glVertex2f(). --- examples/parts/ssd1306_glut.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/parts/ssd1306_glut.c b/examples/parts/ssd1306_glut.c index d258208..fcb62d9 100644 --- a/examples/parts/ssd1306_glut.c +++ b/examples/parts/ssd1306_glut.c @@ -178,10 +178,10 @@ ssd1306_gl_draw (ssd1306_t *part) glTranslatef (0, 0, 0); glBegin (GL_QUADS); - glVertex2f (part->rows, 0); + glVertex2f (0, part->rows*pix_size_g); glVertex2f (0, 0); - glVertex2f (0, part->columns); - glVertex2f (part->rows, part->columns); + glVertex2f (part->columns*pix_size_g, 0); + glVertex2f (part->columns*pix_size_g, part->rows*pix_size_g); glEnd (); // Draw pixels -- 2.39.5