diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h index 597f8c6a..f2019c74 100644 --- a/src/graphics/core/device.h +++ b/src/graphics/core/device.h @@ -243,14 +243,14 @@ enum ShadeModel * \enum FillMode * \brief Polygon fill mode */ -enum FillMode +enum class FillMode : unsigned char { //! Draw only points - FILL_POINT, + POINT, //! Draw only lines - FILL_LINES, + LINES, //! Draw full polygons - FILL_POLY + POLY }; /** diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 1582118c..5edb12a6 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -345,7 +345,7 @@ bool CEngine::Create() m_device->SetClearColor(Color(0.0f, 0.0f, 0.0f, 0.0f)); m_device->SetShadeModel(SHADE_SMOOTH); - m_device->SetFillMode(FILL_POLY); + m_device->SetFillMode(FillMode::POLY); SetFocus(m_focus); diff --git a/src/graphics/opengl/gl33device.cpp b/src/graphics/opengl/gl33device.cpp index 3e937e2e..835eae21 100644 --- a/src/graphics/opengl/gl33device.cpp +++ b/src/graphics/opengl/gl33device.cpp @@ -1547,9 +1547,9 @@ void CGL33Device::SetShadowColor(float value) void CGL33Device::SetFillMode(FillMode mode) { - if (mode == FILL_POINT) glPolygonMode(GL_FRONT_AND_BACK, GL_POINT); - else if (mode == FILL_LINES) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - else if (mode == FILL_POLY) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + if (mode == FillMode::POINT) glPolygonMode(GL_FRONT_AND_BACK, GL_POINT); + else if (mode == FillMode::LINES) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + else if (mode == FillMode::POLY) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); else assert(false); }