| 22 | #include "TexturedCube.h" |
| 23 | |
| 24 | LoadTestSample* |
| 25 | GLLoadTests::showFile(const std::string& filename) |
| 26 | { |
| 27 | KTX_error_code ktxresult; |
| 28 | ktxTexture* kTexture; |
| 29 | ktxresult = ktxTexture_CreateFromNamedFile(filename.c_str(), |
| 30 | KTX_TEXTURE_CREATE_NO_FLAGS, |
| 31 | &kTexture); |
| 32 | if (KTX_SUCCESS != ktxresult) { |
| 33 | std::stringstream message; |
| 34 | |
| 35 | message << "Creation of ktxTexture from \"" << getAssetPath() |
| 36 | << filename << "\" failed: " << ktxErrorString(ktxresult); |
| 37 | throw std::runtime_error(message.str()); |
| 38 | } |
| 39 | |
| 40 | LoadTestSample::PFN_create createViewer; |
| 41 | LoadTestSample* pViewer; |
| 42 | createViewer = DrawTexture::create; |
| 43 | ktxTexture_Destroy(kTexture); |
| 44 | pViewer = createViewer(w_width, w_height, filename.c_str(), ""); |
| 45 | return pViewer; |
| 46 | } |
| 47 | |
| 48 | const GLLoadTests::sampleInvocation siSamples[] = { |
| 49 | { DrawTexture::create, |
nothing calls this directly
no test coverage detected