Unloading PBRMAterial
I forgot unloading PBRMaterial
This commit is contained in:
parent
39dac7c5a3
commit
ed075ce357
1 changed files with 14 additions and 4 deletions
|
|
@ -174,6 +174,7 @@ void PBRSetAmbient(Shader shader, Color color, float intensity);
|
|||
|
||||
PBRModel PBRModelLoad(const char *fileName);
|
||||
void PBRLoadTextures(PBRMaterial *pbrMat,PBRTexType pbrTexType,const char *fileName);
|
||||
void UnloadPBRMaterial(PBRMaterial pbrMat)
|
||||
void PBRSetColor(PBRMaterial *pbrMat,PBRColorType pbrColorType,Color color);
|
||||
void PBRSetVec2(PBRMaterial *pbrMat,PBRVec2Type type,Vector2 value);
|
||||
void PBRSetFloat(PBRMaterial *pbrMat, PBRFloatType pbrParamType, float value);
|
||||
|
|
@ -334,6 +335,13 @@ void PBRLoadTextures(PBRMaterial *pbrMat,PBRTexType pbrTexType,const char *fileN
|
|||
}
|
||||
}
|
||||
|
||||
void UnloadPBRMaterial(PBRMaterial pbrMat){
|
||||
if(pbrMat.useTexAlbedo == 1) UnloadTexture(pbrMat.texAlbedo);
|
||||
if(pbrMat.useTexNormal == 1) UnloadTexture(pbrMat.texNormal);
|
||||
if(pbrMat.useTexMRA == 1) UnloadTexture(pbrMat.texMRA);
|
||||
if(pbrMat.useTexEmissive == 1) UnloadTexture(pbrMat.texEmissive);
|
||||
}
|
||||
|
||||
void PBRSetColor(PBRMaterial *pbrMat,PBRColorType pbrColorType,Color color){
|
||||
if(pbrMat == NULL) return;
|
||||
switch(pbrColorType){
|
||||
|
|
|
|||
Loading…
Reference in a new issue