MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / Load

Method Load

GTE/Applications/MSW/WICFileIONative.cpp:80–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78using ComObject = Microsoft::WRL::ComPtr<T>;
79
80void WICFileIONative::Load(std::string const& filename, uint32_t& outFormat,
81 size_t& outWidth, size_t& outHeight, std::vector<uint8_t>& outTexels)
82{
83 auto const* bytesPerTexel = msBytesPerTexel.data();
84
85 TextureCreator creator = [&outFormat, &outWidth, &outHeight, &outTexels, &bytesPerTexel](
86 uint32_t format, size_t width, size_t height)
87 {
88 outFormat = format;
89 outWidth = width;
90 outHeight = height;
91 outTexels.resize(width * height * bytesPerTexel[format]);
92 return reinterpret_cast<uint8_t*>(outTexels.data());
93 };
94
95 WICFileIONative::Load(filename, creator);
96}
97
98void WICFileIONative::Load(std::string const& filename, TextureCreator const& creator)
99{

Callers

nothing calls this directly

Calls 6

ConvertNarrowToWideFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
IsInitializedMethod · 0.45
GetFrameMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected