MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getTexture

Method getTexture

Engine/source/T3D/assets/ImageAsset.cpp:331–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331GFXTexHandle ImageAsset::getTexture(GFXTextureProfile* requestedProfile)
332{
333 if (mResourceMap.contains(requestedProfile))
334 {
335 mLoadedState = Ok;
336 return mResourceMap.find(requestedProfile)->value;
337 }
338 else
339 {
340 //If we don't have an existing map case to the requested format, we'll just create it and insert it in
341 GFXTexHandle newTex = TEXMGR->createTexture(mImagePath, requestedProfile);
342 if (newTex)
343 {
344 mResourceMap.insert(requestedProfile, newTex);
345 mLoadedState = Ok;
346 return newTex;
347 }
348 else
349 mLoadedState = BadFileReference;
350 }
351
352 //if (mTexture.isValid())
353 // return mTexture;
354
355 return nullptr;
356}
357
358const char* ImageAsset::getImageInfo()
359{

Callers 15

getTextureSamplerMethod · 0.45
_setupTextureMethod · 0.45
_setupTargetMethod · 0.45
processMethod · 0.45
setupPassMethod · 0.45
_texDelegateMethod · 0.45
renderMethod · 0.45
preloadMethod · 0.45
onRenderMethod · 0.45

Calls 4

containsMethod · 0.45
findMethod · 0.45
createTextureMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected