MCPcopy Create free account
hub / github.com/assimp/assimp / SetTextureBG

Method SetTextureBG

tools/assimp_view/Background.cpp:203–222  ·  view source on GitHub ↗

-------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

201}
202//-------------------------------------------------------------------------------
203void 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//-------------------------------------------------------------------------------
224void CBackgroundPainter::OnPreRender() {
225 if (SIMPLE_COLOR != eMode) {

Callers 4

LoadBGTextureFunction · 0.80
MessageProcFunction · 0.80
_tWinMainFunction · 0.80
CreateMaterialMethod · 0.80

Calls 5

RemoveSBDepsMethod · 0.95
InstanceClass · 0.85
FindValidPathMethod · 0.80
ReleaseMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected