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

Function ktxTexture2_constructFromStdioStream

lib/texture2.c:1131–1145  ·  view source on GitHub ↗

* @memberof ktxTexture2 @private * @~English * @brief Construct a ktxTexture 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]

Source from the content-addressed store, hash-verified

1129 * For other exceptions, see ktxTexture_constructFromStream().
1130 */
1131static KTX_error_code
1132ktxTexture2_constructFromStdioStream(ktxTexture2* This, FILE* stdioStream,
1133 ktxTextureCreateFlags createFlags)
1134{
1135 KTX_error_code result;
1136 ktxStream stream;
1137
1138 if (stdioStream == NULL || This == NULL)
1139 return KTX_INVALID_VALUE;
1140
1141 result = ktxFileStream_construct(&stream, stdioStream, KTX_FALSE);
1142 if (result == KTX_SUCCESS)
1143 result = ktxTexture2_constructFromStream(This, &stream, createFlags);
1144 return result;
1145}
1146
1147/**
1148 * @memberof ktxTexture2 @private

Callers 1

Calls 2

ktxFileStream_constructFunction · 0.85

Tested by

no test coverage detected