From: Delio Brignoli Date: Sat, 16 Sep 2017 16:57:43 +0000 (+0100) Subject: ssd1306: fix background painting X-Git-Tag: v1.6~12 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=face1cf98329be2800b1fae1714d3c457af28709;p=sx%2Fsimavr.git ssd1306: fix background painting - Take pixel size into account. - Fix swapped coordinates passed to glVertex2f(). --- 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