Material sub-system
Closed this issue · 0 comments
hogsy commented
Goes in hand with the changes introduced earlier for the shaders.
- Implementation of material class
- Serialisation and de-serialisation of Json data
- Material editor - shader selection drop down, available properties are pulled from
.program
May depend on a layer around PLMesh or PLModel to incorporate the changes.
API Example
Material* material = Engine::Resources()->LoadMaterial("materials/example.material");
Example
(default.program)
{
"gl3": {
"vertPath":"shaders/gl3/default.vert",
"fragPath":"shaders/gl3/default.frag"
}
}
(example.material)
{
"shaderProgram":"shaders/default.program", (use the default shader program)
"properties": [
"diffuse":"materials/example.png",
"specular":"materials/example_s.png",
"exponent":0.5
]
}