mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-20 13:25:10 +00:00
shaders are working for models
This commit is contained in:
@@ -106,4 +106,15 @@ namespace RAY::Drawables::Drawables3D {
|
||||
{
|
||||
DrawModelEx(*this->_model, this->_position, this->_rotationAxis, this->_rotationAngle, this->_scale, this->_color);
|
||||
}
|
||||
|
||||
void Model::setShader(const RAY::Shader &shader)
|
||||
{
|
||||
this->_originalShader = this->_model->materials[0].shader;
|
||||
this->_model->materials[0].shader = *shader.getShaderPtr();
|
||||
}
|
||||
|
||||
void Model::resetShader()
|
||||
{
|
||||
this->_model->materials[0].shader = this->_originalShader;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user