This repository has been archived on 2025-03-10. You can view files and clone it, but cannot push or open issues or pull requests.

41 lines
885 B
C++

#pragma once
#include "Drawable.h"
#include "Assets.h"
#include "Utility.h"
namespace nf {
class Drawable;
class Texture;
class Shader;
class Material : public Drawable {
public:
Material(const void* vb, const size_t vbSize, const void* tc, const size_t tcSize, const void* vn, const size_t vnSize, const void* ib, const unsigned int ibCount, ATexture* diffTex, Vec3& diffColor, ATexture* specTex, float shininess);
void render(Shader* shader);
~Material();
private:
bool m_hasDiffuse = false;
Texture* m_diffuseTexture = nullptr;
Vec3 m_diffColor;
bool m_hasSpecular = false;
Texture* m_specularTexture = nullptr;
float m_shininess;
};
class Model {
public:
Model(AModel* model);
void render(Shader* shader);
void setBaseAsset(bool isBase);
bool isBaseAsset();
~Model();
private:
bool m_base;
std::vector<Material*> m_materials;
};
}