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

Function ktxTexture1_constructFromStdioStream

lib/texture1.c:444–458  ·  view source on GitHub ↗

* @memberof ktxTexture1 @private * @brief Construct a ktxTexture1 from a stdio stream reading from a KTX source. * * See ktxTextureInt_constructFromStream for details. * * @note Do not close the stdio stream until you are finished with the texture * object. * * @param[in] This pointer to a ktxTextureInt-sized block of memory to * initialize. * @param[in] stdioStream

Source from the content-addressed store, hash-verified

442 * For other exceptions, see ktxTexture_constructFromStream().
443 */
444static KTX_error_code
445ktxTexture1_constructFromStdioStream(ktxTexture1* This, FILE* stdioStream,
446 ktxTextureCreateFlags createFlags)
447{
448 ktxStream stream;
449 KTX_error_code result;
450
451 if (stdioStream == NULL || This == NULL)
452 return KTX_INVALID_VALUE;
453
454 result = ktxFileStream_construct(&stream, stdioStream, KTX_FALSE);
455 if (result == KTX_SUCCESS)
456 result = ktxTexture1_constructFromStream(This, &stream, createFlags);
457 return result;
458}
459
460/**
461 * @memberof ktxTexture1 @private

Callers 1

Calls 2

ktxFileStream_constructFunction · 0.85

Tested by

no test coverage detected