mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #188 from lioncash/class
CModelShaders: Make EExtendedShader an enum class
This commit is contained in:
commit
f8e40e600f
|
@ -359,7 +359,7 @@ CBooModel::ModelInstance* CBooModel::PushNewModelInstance(int sharedLayoutBuf) {
|
||||||
std::vector<boo::ObjToken<boo::IShaderDataBinding>>& extendeds = newInst.m_shaderDataBindings.back();
|
std::vector<boo::ObjToken<boo::IShaderDataBinding>>& extendeds = newInst.m_shaderDataBindings.back();
|
||||||
extendeds.reserve(pipelines->size());
|
extendeds.reserve(pipelines->size());
|
||||||
|
|
||||||
int idx = 0;
|
EExtendedShader idx{};
|
||||||
for (const auto& pipeline : *pipelines) {
|
for (const auto& pipeline : *pipelines) {
|
||||||
if (idx == EExtendedShader::Thermal) {
|
if (idx == EExtendedShader::Thermal) {
|
||||||
texs[8] = g_Renderer->x220_sphereRamp.get();
|
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,
|
extendeds.push_back(ctx.newShaderDataBinding(pipeline, newInst.GetBooVBO(*this, ctx), nullptr,
|
||||||
m_staticIbo.get(), 4, bufs, stages, thisOffs, thisSizes, 12, texs,
|
m_staticIbo.get(), 4, bufs, stages, thisOffs, thisSizes, 12, texs,
|
||||||
nullptr, nullptr));
|
nullptr, nullptr));
|
||||||
++idx;
|
idx = EExtendedShader(size_t(idx) + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -21,7 +21,7 @@ class ShaderTag;
|
||||||
namespace urde {
|
namespace urde {
|
||||||
class CLight;
|
class CLight;
|
||||||
|
|
||||||
enum EExtendedShader : uint8_t {
|
enum class EExtendedShader : uint8_t {
|
||||||
Flat,
|
Flat,
|
||||||
Lighting,
|
Lighting,
|
||||||
Thermal,
|
Thermal,
|
||||||
|
@ -96,7 +96,7 @@ public:
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
static void Shutdown();
|
static void Shutdown();
|
||||||
|
|
||||||
using ShaderPipelinesData = std::array<boo::ObjToken<boo::IShaderPipeline>, EExtendedShader::MAX>;
|
using ShaderPipelinesData = std::array<boo::ObjToken<boo::IShaderPipeline>, size_t(EExtendedShader::MAX)>;
|
||||||
using ShaderPipelines = std::shared_ptr<ShaderPipelinesData>;
|
using ShaderPipelines = std::shared_ptr<ShaderPipelinesData>;
|
||||||
|
|
||||||
using Material = DataSpec::DNAMP1::HMDLMaterialSet::Material;
|
using Material = DataSpec::DNAMP1::HMDLMaterialSet::Material;
|
||||||
|
|
Loading…
Reference in New Issue