Fix UIReggedMaterial::ReregisterMaterial and UIReggedMaterial::GetMaterial

ReregisterMaterial() must register the material if it was registered before, and GetMaterial() must register the material if it hasn't been registered and return it
This commit is contained in:
smallmodel 2024-07-24 21:10:46 +02:00
parent c093122764
commit 016e062fef
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
12 changed files with 8 additions and 74 deletions

View file

@ -270,7 +270,6 @@ void UILabel::Draw(void)
m_sCurrentShaderName = string;
setMaterial(uWinMan.RegisterShader(m_sCurrentShaderName));
m_material->ReregisterMaterial();
if (!m_material->GetMaterial()) {
setMaterial(NULL);