| GL Studio C++ Runtime API

Public Member Functions | Public Attributes | Static Public Attributes | List of all members
TexturePaletteEntry Class Reference

`#include <texture_palette.h>`

## Public Member Functions
| TexturePaletteEntry (const TexturePaletteEntry &source)
void | Initialize ()
| Set up the default member values.
TexturePaletteEntry & | operator= (const TexturePaletteEntry &source)
TextureState_e | TextureStatus ()
const char * | Filename () const
void | Filename (const char *name)
void | Invalidate ()
| Sets the texture state to invalid.
void | Validate ()
| Set the texture state to valid.
void | Ignore ()
| Sets texture to NULL and status to IGNORED.
bool | IsEmpty () const
bool | IsIgnored () const
bool | IsUsed () const
std::ostream & | WriteValue (std::ostream &outstr)
std::istream & | ReadValue (std::istream &instr)

## Public Attributes
bool | generateInline
| True if the image is to be generated as inline code.
bool | reverseAlpha
| True if the alpha channel should be reversed on load.
bool | isLoadingDeferred
| True if loading should be deferred until first draw.
Image * | texture
| Pointer to the texture object itself.
long | compressedSize
| Size of image when compressed with currently set inline CODEC.
glsImageCodec | codec
| CODEC that will be used to compress an inline image.
int | compressionFactor
| Compression factor of the image, used only for JPEG.
int | desiredLoadWidth
| The width that the image should load at. 0 indicates full size. (Editor only)
int | desiredLoadHeight
| The height that the image should load at. 0 indicates full size. (Editor only)
int | sourceImageWidth
| The width of the source image. (pixels) (Editor only)
int | sourceImageHeight
| The height of the source image. (pixels) (Editor only)
int | sourceImageMemSize
| The size of the source image im memory. (bytes) (Editor only)
bool | useGLTextureCompression
| True if the image should be generated to use hardware texture compression. (Editor only)
bool | allowNPOT
| Allow Non-power of two texture (do not scale up).

## Static Public Attributes
static bool | _defaultGenerateInline
| Unused, kept for backward compatibility.

## Detailed Description

A texture palette entry. Keeps track of which textures are assigned to each entry in the texture palette

## Constructor & Destructor Documentation

## ◆ TexturePaletteEntry()

TexturePaletteEntry | ( | const TexturePaletteEntry & | source | ) |

Copy constructor

Parameters

  source | The object to copy from.

## Member Function Documentation

## ◆ Filename() [1/2]

const char * Filename | ( |  | ) | const

Returns
  The filename relative to the current working directory.

## ◆ Filename() [2/2]

void Filename | ( | const char * | name | ) |

Set the file name relative to the current working directory.

Parameters

  name | The new file name to set.

## ◆ IsEmpty()

bool IsEmpty | ( |  | ) | const

Returns
  True if there is no texture object (unused or ignored).

## ◆ IsIgnored()

bool IsIgnored | ( |  | ) | const

Returns
  True if ignored.

## ◆ IsUsed()

bool IsUsed | ( |  | ) | const

Returns
  True if invalid or valid (not unused or ignored).

## ◆ operator=()

TexturePaletteEntry & operator= | ( | const TexturePaletteEntry & | source | ) |

Assignment operator

Parameters

  source | Tthe object to copy from.

Returns
  The resulting object (this).

## ◆ ReadValue()

std::istream & ReadValue | ( | std::istream & | instr | ) |

Reads this object from a stream.

Parameters

  instr | The stream to read from.

Returns
  The stream in its current state.

## ◆ TextureStatus()

TextureState_e TextureStatus | ( |  | ) |
| inline

Returns
  The texture load state.

## ◆ WriteValue()

std::ostream & WriteValue | ( | std::ostream & | outstr | ) |

Writes this object to a stream.

Parameters

  outstr | The stream to write to.

Returns
  The stream in its current state.

The documentation for this class was generated from the following file:

- texture_palette.h