diff options
| author | Matthias Melcher <github@matthiasm.com> | 2022-12-10 16:03:29 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2022-12-10 16:03:29 +0100 |
| commit | 60d6e9be1469ae148d30c4a4366aac136580785a (patch) | |
| tree | 2300aea59bfe005ab3f52964e65fb487e1005f43 /src/drivers/OpenGL | |
| parent | 8dea6505e92a93156820ea24f1256f08cf2b9e8f (diff) | |
Fixes some VC compiler warnings
Diffstat (limited to 'src/drivers/OpenGL')
| -rw-r--r-- | src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx index bf29ff8df..461e045bb 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx @@ -196,6 +196,8 @@ void Fl_OpenGL_Graphics_Driver::end_complex_polygon() } // fill the pixels between node pairs +// Using lines requires additional attention to the current line width and pattern +// We are using glRectf instead // glBegin(GL_LINES); for (i = 0; i < nNodes; i += 2) { float x0 = nodeX[i]; @@ -207,7 +209,7 @@ void Fl_OpenGL_Graphics_Driver::end_complex_polygon() x0 = xMin; if (x1 > xMax) x1 = xMax; - glRectf(x0-0.25f, y, x1+0.25f, y+1.0f); + glRectf((GLfloat)(x0-0.25f), (GLfloat)(y), (GLfloat)(x1+0.25f), (GLfloat)(y+1.0f)); // glVertex2f((GLfloat)x0, (GLfloat)y); // glVertex2f((GLfloat)x1, (GLfloat)y); } |
