diff --git a/Runtime/Graphics/CModelBoo.cpp b/Runtime/Graphics/CModelBoo.cpp index e2992e644..e3acec569 100644 --- a/Runtime/Graphics/CModelBoo.cpp +++ b/Runtime/Graphics/CModelBoo.cpp @@ -359,7 +359,7 @@ CBooModel::ModelInstance* CBooModel::PushNewModelInstance(int sharedLayoutBuf) { std::vector>& extendeds = newInst.m_shaderDataBindings.back(); extendeds.reserve(pipelines->size()); - int idx = 0; + EExtendedShader idx{}; for (const auto& pipeline : *pipelines) { if (idx == EExtendedShader::Thermal) { texs[8] = g_Renderer->x220_sphereRamp.get(); @@ -387,7 +387,7 @@ CBooModel::ModelInstance* CBooModel::PushNewModelInstance(int sharedLayoutBuf) { extendeds.push_back(ctx.newShaderDataBinding(pipeline, newInst.GetBooVBO(*this, ctx), nullptr, m_staticIbo.get(), 4, bufs, stages, thisOffs, thisSizes, 12, texs, nullptr, nullptr)); - ++idx; + idx = EExtendedShader(size_t(idx) + 1); } } return true; diff --git a/Runtime/Graphics/Shaders/CModelShaders.hpp b/Runtime/Graphics/Shaders/CModelShaders.hpp index c17e6f381..a5ec89768 100644 --- a/Runtime/Graphics/Shaders/CModelShaders.hpp +++ b/Runtime/Graphics/Shaders/CModelShaders.hpp @@ -21,7 +21,7 @@ class ShaderTag; namespace urde { class CLight; -enum EExtendedShader : uint8_t { +enum class EExtendedShader : uint8_t { Flat, Lighting, Thermal, @@ -96,7 +96,7 @@ public: static void Initialize(); static void Shutdown(); - using ShaderPipelinesData = std::array, EExtendedShader::MAX>; + using ShaderPipelinesData = std::array, size_t(EExtendedShader::MAX)>; using ShaderPipelines = std::shared_ptr; using Material = DataSpec::DNAMP1::HMDLMaterialSet::Material;