MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / showFile

Method showFile

tests/loadtests/glloadtests/gles1/ES1LoadTests.cpp:24–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22#include "TexturedCube.h"
23
24LoadTestSample*
25GLLoadTests::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
48const GLLoadTests::sampleInvocation siSamples[] = {
49 { DrawTexture::create,

Callers

nothing calls this directly

Calls 4

ktxErrorStringFunction · 0.85
c_strMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected