diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx index 633e5a972e7e..8d697e1af104 100644 --- a/canvas/source/directx/dx_9rm.cxx +++ b/canvas/source/directx/dx_9rm.cxx @@ -501,7 +501,7 @@ namespace dxcanvas mnBeginSceneCount(0), mbCanUseDynamicTextures(false), mbError( false ), - meType( PRIMITIVE_TYPE_UNKNOWN ), + meType( PrimitiveType::Unknown ), maPageSize(), mad3dpp(), maNumVertices( VERTEX_BUFFER_SIZE ), @@ -1038,8 +1038,8 @@ namespace dxcanvas return; --mnBeginSceneCount; - meType=PRIMITIVE_TYPE_UNKNOWN; - mnCount=0; + meType = PrimitiveType::Unknown; + mnCount = 0; } @@ -1056,7 +1056,7 @@ namespace dxcanvas switch(meType) { - case PRIMITIVE_TYPE_TRIANGLE: + case PrimitiveType::Triangle: { maVertexCache.push_back(vertex); ++mnCount; @@ -1064,7 +1064,7 @@ namespace dxcanvas break; } - case PRIMITIVE_TYPE_QUAD: + case PrimitiveType::Quad: { if(mnCount == 3) { diff --git a/canvas/source/tools/surface.cxx b/canvas/source/tools/surface.cxx index 8cd5e93a41ba..c1ff5a218f65 100644 --- a/canvas/source/tools/surface.cxx +++ b/canvas/source/tools/surface.cxx @@ -158,7 +158,7 @@ namespace canvas vertex.z = 0.0f; { - pRenderModule->beginPrimitive( canvas::IRenderModule::PRIMITIVE_TYPE_QUAD ); + pRenderModule->beginPrimitive( canvas::IRenderModule::PrimitiveType::Quad ); // issue an endPrimitive() when leaving the scope const ::comphelper::ScopeGuard aScopeGuard( @@ -279,7 +279,7 @@ namespace canvas vertex.z = 0.0f; { - pRenderModule->beginPrimitive( canvas::IRenderModule::PRIMITIVE_TYPE_QUAD ); + pRenderModule->beginPrimitive( canvas::IRenderModule::PrimitiveType::Quad ); // issue an endPrimitive() when leaving the scope const ::comphelper::ScopeGuard aScopeGuard( @@ -385,7 +385,7 @@ namespace canvas nVertexCount/3 ); #endif - pRenderModule->beginPrimitive( canvas::IRenderModule::PRIMITIVE_TYPE_TRIANGLE ); + pRenderModule->beginPrimitive( canvas::IRenderModule::PrimitiveType::Triangle ); // issue an endPrimitive() when leaving the scope const ::comphelper::ScopeGuard aScopeGuard( diff --git a/include/canvas/rendering/irendermodule.hxx b/include/canvas/rendering/irendermodule.hxx index 9eeffa57c828..01dc94413161 100644 --- a/include/canvas/rendering/irendermodule.hxx +++ b/include/canvas/rendering/irendermodule.hxx @@ -54,11 +54,11 @@ namespace canvas /** Type of primitive passed to the render module via pushVertex() */ - enum PrimitiveType + enum class PrimitiveType { - PRIMITIVE_TYPE_UNKNOWN, - PRIMITIVE_TYPE_TRIANGLE, - PRIMITIVE_TYPE_QUAD + Unknown, + Triangle, + Quad }; virtual ~IRenderModule() {}