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

Function ktxTexture_CreateFromStdioStream

lib/texture.c:371–387  ·  view source on GitHub ↗

* @memberof ktxTexture * @~English * @brief Create a ktxTexture1 or ktxTexture2 from a stdio stream according * to the stream data. * * See @ref ktxTexture1::ktxTexture1_CreateFromStdioStream * "ktxTexture1_CreateFromStdioStream" or * @ref ktxTexture2::ktxTexture2_CreateFromStdioStream * "ktxTexture2_CreateFromStdioStream" for details. */

Source from the content-addressed store, hash-verified

369 * "ktxTexture2_CreateFromStdioStream" for details.
370 */
371KTX_error_code
372ktxTexture_CreateFromStdioStream(FILE* stdioStream,
373 ktxTextureCreateFlags createFlags,
374 ktxTexture** newTex)
375{
376 ktxStream stream;
377 KTX_error_code result;
378
379 if (stdioStream == NULL || newTex == NULL)
380 return KTX_INVALID_VALUE;
381
382 result = ktxFileStream_construct(&stream, stdioStream, KTX_FALSE);
383 if (result == KTX_SUCCESS) {
384 result = ktxTexture_CreateFromStream(&stream, createFlags, newTex);
385 }
386 return result;
387}
388
389/**
390 * @memberof ktxTexture

Callers 1

TEST_FFunction · 0.85

Calls 2

ktxFileStream_constructFunction · 0.85

Tested by 1

TEST_FFunction · 0.68