-------------------------------------------------------------------------------
| 201 | } |
| 202 | //------------------------------------------------------------------------------- |
| 203 | void CBackgroundPainter::SetTextureBG(const char *p_szPath) { |
| 204 | if (TEXTURE_CUBE == this->eMode) this->RemoveSBDeps(); |
| 205 | |
| 206 | if (pcTexture) { |
| 207 | pcTexture->Release(); |
| 208 | pcTexture = nullptr; |
| 209 | } |
| 210 | |
| 211 | eMode = TEXTURE_2D; |
| 212 | szPath = std::string(p_szPath); |
| 213 | |
| 214 | // ARRRGHH... ugly. TODO: Rewrite this! |
| 215 | aiString sz; |
| 216 | sz.Set(szPath); |
| 217 | CMaterialManager::Instance().FindValidPath(&sz); |
| 218 | szPath = std::string(sz.data); |
| 219 | |
| 220 | // now recreate all native resources |
| 221 | RecreateNativeResource(); |
| 222 | } |
| 223 | //------------------------------------------------------------------------------- |
| 224 | void CBackgroundPainter::OnPreRender() { |
| 225 | if (SIMPLE_COLOR != eMode) { |
no test coverage detected