diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-02-26 19:48:47 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-02-26 19:48:47 +0100 |
| commit | fcf89b580eb832731caa3c33d4e7a94c86f1265e (patch) | |
| tree | 4e47665feb3b8b8ec4d7196f98f2d7cd874c64d4 /src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx | |
| parent | 7810cda145dae1a0dfc739ec24078a73e3138088 (diff) | |
Fix Visual Studio build warnings in OpenGL graphics driver
Diffstat (limited to 'src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx')
| -rw-r--r-- | src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx index c1963352b..95b73408b 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx @@ -32,7 +32,7 @@ void Fl_OpenGL_Graphics_Driver::line_style(int style, int width, char* dashes) { if (width<1) width = 1; - line_width_ = width; + line_width_ = (float)width; int stipple = style & 0x00ff; line_stipple_ = stipple; @@ -46,16 +46,16 @@ void Fl_OpenGL_Graphics_Driver::line_style(int style, int width, char* dashes) { char enable = 1; switch (stipple & 0x00ff) { case FL_DASH: - glLineStipple(pixels_per_unit_*line_width_, 0x0F0F); // ....****....**** + glLineStipple(GLint(pixels_per_unit_*line_width_), 0x0F0F); // ....****....**** break; case FL_DOT: - glLineStipple(pixels_per_unit_*line_width_, 0x5555); // .*.*.*.*.*.*.*.* + glLineStipple(GLint(pixels_per_unit_*line_width_), 0x5555); // .*.*.*.*.*.*.*.* break; case FL_DASHDOT: - glLineStipple(pixels_per_unit_*line_width_, 0x2727); // ..*..***..*..*** + glLineStipple(GLint(pixels_per_unit_*line_width_), 0x2727); // ..*..***..*..*** break; case FL_DASHDOTDOT: - glLineStipple(pixels_per_unit_*line_width_, 0x5757); // .*.*.***.*.*.*** + glLineStipple(GLint(pixels_per_unit_*line_width_), 0x5757); // .*.*.***.*.*.*** break; default: glLineStipple(1, 0xFFFF); |
