|
virtual void | release ()=0 |
| Release resources held by this pointer (pointer becomes invalid). More...
|
|
virtual void | setBorderModes (Ptex::BorderMode uBorderMode, Ptex::BorderMode vBorderMode)=0 |
| Set border modes.
|
|
virtual void | writeMeta (const char *key, const char *string)=0 |
| Write a string as meta data. More...
|
|
virtual void | writeMeta (const char *key, const int8_t *value, int count)=0 |
| Write an array of signed 8-bit integers as meta data. More...
|
|
virtual void | writeMeta (const char *key, const int16_t *value, int count)=0 |
| Write an array of signed 16-bit integers as meta data. More...
|
|
virtual void | writeMeta (const char *key, const int32_t *value, int count)=0 |
| Write an array of signed 32-bit integers as meta data. More...
|
|
virtual void | writeMeta (const char *key, const float *value, int count)=0 |
| Write an array of signed 32-bit floats as meta data. More...
|
|
virtual void | writeMeta (const char *key, const double *value, int count)=0 |
| Write an array of signed 32-bit doubles as meta data. More...
|
|
virtual void | writeMeta (PtexMetaData *data)=0 |
| Copy meta data from an existing meta data block. More...
|
|
virtual bool | writeFace (int faceid, const Ptex::FaceInfo &info, const void *data, int stride=0)=0 |
| Write texture data for a face. More...
|
|
virtual bool | writeConstantFace (int faceid, const Ptex::FaceInfo &info, const void *data)=0 |
| Write constant texture data for a face. More...
|
|
virtual bool | close (Ptex::String &error)=0 |
| Close the file. More...
|
|
|
static PtexWriter * | open (const char *path, Ptex::MeshType mt, Ptex::DataType dt, int nchannels, int alphachan, int nfaces, Ptex::String &error, bool genmipmaps=true) |
| Open a new texture file for writing. More...
|
|
static PtexWriter * | edit (const char *path, bool incremental, Ptex::MeshType mt, Ptex::DataType dt, int nchannels, int alphachan, int nfaces, Ptex::String &error, bool genmipmaps=true) |
| Open an existing texture file for writing. More...
|
|
static bool | applyEdits (const char *path, Ptex::String &error) |
| Apply edits to a file. More...
|
|
Interface for writing data to a ptex file.
Note: if an alpha channel is specified, then the textures being written to the file are expected to have unmultiplied-alpha data. Generated mipmaps will be premultiplied by the Ptex library. On read, PtexTexture will (if requested) premultiply all textures by alpha when getData is called; by default only reductions are premultiplied. If the source textures are already premultiplied, then alphachan can be set to -1 and the library will just leave all the data as-is. The only reason to store unmultiplied-alpha textures in the file is to preserve the original texture data for later editing.
Open an existing texture file for writing.
If the incremental param is specified as true, then data values written to the file are appended to the file as "edit
blocks". This is the fastest way to write data to the file, but edit blocks are slower to read back, and they have no mipmaps so filtering can be inefficient.
If incremental is false, then the edits are applied to the file and the entire file is regenerated on close as if it were written all at once with open().
If the file doesn't exist it will be created and written as if open() were used. If the file exists, the mesh type, data type, number of channels, alpha channel, and number of faces must agree with those stored in the file.