* @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]
| 1129 | * For other exceptions, see ktxTexture_constructFromStream(). |
| 1130 | */ |
| 1131 | static KTX_error_code |
| 1132 | ktxTexture2_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 |
no test coverage detected