libktx Reference 4.3.2
Libraries and tools to create and read KTX image texture files.
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ktxStream Struct Reference

Interface of ktxStream. More...

#include <ktx.h>

Data Fields

ktxStream_read read
 
ktxStream_skip skip
 
ktxStream_write write
 
ktxStream_getpos getpos
 
ktxStream_setpos setpos
 
ktxStream_getsize getsize
 
ktxStream_destruct destruct
 
union {
   FILE *   file
 
   ktxMem *   mem
 
   struct {
      void *   address
 
      void *   allocatorAddress
 
      ktx_size_t   size
 
   }   custom_ptr
 
data
 
ktx_off_t readpos
 
ktx_bool_t closeOnDestruct
 

Detailed Description

Interface of ktxStream.

Author
Maksim Kolesin
Georg Kolling, Imagination Technology
Mark Callow, HI Corporation

Field Documentation

◆ address

void* address

pointer to the data.

◆ allocatorAddress

void* allocatorAddress

pointer to a memory allocator.

◆ closeOnDestruct

ktx_bool_t closeOnDestruct

Close FILE* or dispose of memory on destruct.

◆ 

struct { ... } custom_ptr

pointer to a struct for custom streams.

◆ 

union { ... } data

pointer to the stream data.

◆ destruct

destruct the stream.

◆ file

FILE* file

a stdio FILE pointer for a ktxFileStream.

◆ getpos

pointer to function for getting current position in stream.

◆ getsize

pointer to function for querying size.

◆ mem

ktxMem* mem

a pointer to a ktxMem struct for a ktxMemStream.

◆ read

pointer to function for reading bytes.

◆ readpos

ktx_off_t readpos

used by FileStream for stdin.

◆ setpos

pointer to function for setting current position in stream.

◆ size

ktx_size_t size

size of the data.

◆ skip

pointer to function for skipping bytes.

◆ write

pointer to function for writing bytes.