Refactored FillMode to enum class
parent
39c837d323
commit
0568fcdb81
|
@ -243,14 +243,14 @@ enum ShadeModel
|
||||||
* \enum FillMode
|
* \enum FillMode
|
||||||
* \brief Polygon fill mode
|
* \brief Polygon fill mode
|
||||||
*/
|
*/
|
||||||
enum FillMode
|
enum class FillMode : unsigned char
|
||||||
{
|
{
|
||||||
//! Draw only points
|
//! Draw only points
|
||||||
FILL_POINT,
|
POINT,
|
||||||
//! Draw only lines
|
//! Draw only lines
|
||||||
FILL_LINES,
|
LINES,
|
||||||
//! Draw full polygons
|
//! Draw full polygons
|
||||||
FILL_POLY
|
POLY
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -345,7 +345,7 @@ bool CEngine::Create()
|
||||||
|
|
||||||
m_device->SetClearColor(Color(0.0f, 0.0f, 0.0f, 0.0f));
|
m_device->SetClearColor(Color(0.0f, 0.0f, 0.0f, 0.0f));
|
||||||
m_device->SetShadeModel(SHADE_SMOOTH);
|
m_device->SetShadeModel(SHADE_SMOOTH);
|
||||||
m_device->SetFillMode(FILL_POLY);
|
m_device->SetFillMode(FillMode::POLY);
|
||||||
|
|
||||||
SetFocus(m_focus);
|
SetFocus(m_focus);
|
||||||
|
|
||||||
|
|
|
@ -1547,9 +1547,9 @@ void CGL33Device::SetShadowColor(float value)
|
||||||
|
|
||||||
void CGL33Device::SetFillMode(FillMode mode)
|
void CGL33Device::SetFillMode(FillMode mode)
|
||||||
{
|
{
|
||||||
if (mode == FILL_POINT) glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
|
if (mode == FillMode::POINT) glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
|
||||||
else if (mode == FILL_LINES) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
else if (mode == FillMode::LINES) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||||
else if (mode == FILL_POLY) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
else if (mode == FillMode::POLY) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||||
else assert(false);
|
else assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue