| 356 | } |
| 357 | |
| 358 | const char* ImageAsset::getImageInfo() |
| 359 | { |
| 360 | if (mIsValidImage) |
| 361 | { |
| 362 | static const U32 bufSize = 2048; |
| 363 | char* returnBuffer = Con::getReturnBuffer(bufSize); |
| 364 | |
| 365 | GFXTexHandle newTex = TEXMGR->createTexture(mImagePath, &GFXStaticTextureSRGBProfile); |
| 366 | if (newTex) |
| 367 | { |
| 368 | dSprintf(returnBuffer, bufSize, "%s %d %d %d", GFXStringTextureFormat[newTex->getFormat()], newTex->getHeight(), newTex->getWidth(), newTex->getDepth()); |
| 369 | newTex = nullptr; |
| 370 | } |
| 371 | else |
| 372 | { |
| 373 | dSprintf(returnBuffer, bufSize, "ImageAsset::getImageInfo() - Failed to get image info for %s", getAssetId()); |
| 374 | } |
| 375 | |
| 376 | return returnBuffer; |
| 377 | } |
| 378 | |
| 379 | return ""; |
| 380 | } |
| 381 | |
| 382 | const char* ImageAsset::getImageTypeNameFromType(ImageAsset::ImageTypes type) |
| 383 | { |
no test coverage detected