![]() |
libktx Reference 4.4.2
Libraries and tools to create and read KTX image texture files.
|
Implementation of ktxStream for FILE. More...
#include <assert.h>#include <errno.h>#include <inttypes.h>#include <string.h>#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <sys/stat.h>#include "ktx.h"#include "ktxint.h"#include "filestream.h"
Functions | |
| KTX_error_code | ktxFileStream_construct (ktxStream *str, FILE *file, ktx_bool_t closeFileOnDestruct) |
| Initialize a ktxFileStream. | |
| void | ktxFileStream_destruct (ktxStream *str) |
| Destruct the stream, potentially closing the underlying FILE. | |
Implementation of ktxStream for FILE.
| KTX_error_code ktxFileStream_construct | ( | ktxStream * | str, |
| FILE * | file, | ||
| ktx_bool_t | closeFileOnDestruct ) |
Initialize a ktxFileStream.
| [in] | str | pointer to the ktxStream to initialize. |
| [in] | file | pointer to the underlying FILE object. |
| [in] | closeFileOnDestruct | if not false, stdio file pointer will be closed when ktxStream is destructed. |
| KTX_INVALID_VALUE | stream is NULL or file is NULL. |
| void ktxFileStream_destruct | ( | ktxStream * | str | ) |
Destruct the stream, potentially closing the underlying FILE.
This only closes the underyling FILE if the closeOnDestruct parameter to ktxFileStream_construct() was not KTX_FALSE.
| [in] | str | pointer to the ktxStream whose FILE is to potentially be closed. |