Refactored FillMode to enum class
parent
39c837d323
commit
0568fcdb81
|
@ -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
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue