40 #ifndef _TEXTURE_PALETTE_H
41 #define _TEXTURE_PALETTE_H
56 const int NO_TEXTURE = -1;
60 const int MULTIPLE_TEXTURES_SELECTED = -2;
81 virtual GLS_EXPORT ~DistiAttributeImageCodecEnum();
93 char* _returned_filename;
94 bool _supportsNPOTValue;
96 void SupportsAllowNPOT();
101 static GLS_EXPORT
bool _defaultGenerateInline;
122 GLS_EXPORT
void Initialize(
void );
126 GLS_EXPORT
TextureState_e TextureStatus(
void ) {
return status; }
127 GLS_EXPORT
const char* Filename(
void )
const;
128 GLS_EXPORT
void Filename(
const char* name );
129 GLS_EXPORT
void Invalidate(
void );
130 GLS_EXPORT
void Validate(
void );
131 GLS_EXPORT
void Ignore();
133 GLS_EXPORT
bool IsEmpty()
const;
134 GLS_EXPORT
bool IsIgnored()
const;
135 GLS_EXPORT
bool IsUsed()
const;
137 GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
138 GLS_EXPORT std::istream& ReadValue( std::istream& instr );
148 Image* _defaultTexture;
155 void ( *_paletteUpdateCallback )( bool, int,
DisplayFrame* );
177 GLS_EXPORT ~TexturePalette(
void );
179 GLS_EXPORT
void operator=( TexturePalette& source );
193 DISTI_DEPRECATED(
"Member data has been made private. Use accessor functions like Entry() and Count() instead." )
197 GLS_EXPORT
unsigned int Count() const;
231 GLS_EXPORT
bool SetTexture(
int i, const
char* filename, const
Image::LoadOptions& options =
Image::LoadOptions(),
bool glTexCompress = false,
bool allowNPOT = true,
bool isLoadingDeferred = true );
281 GLS_EXPORT
int Width(
int i );
287 GLS_EXPORT
int Height(
int i );
399 GLS_EXPORT
void AllowNPOT(
int i,
bool val );
434 GLS_EXPORT
void Reload(
int i );
440 GLS_EXPORT
void SetMipMap(
int i,
bool val );
458 static GLS_EXPORT
bool DownsizeImage(
Image* image,
int desiredWidth,
int desiredHeight );
472 virtual std::ostream&
WriteValue( std::ostream& outstr ) {
return outstr; }
474 virtual GLS_EXPORT std::istream&
ReadValue( std::istream& instr );
485 virtual GLS_EXPORT std::ostream&
WriteValue( std::ostream& outstr );
486 virtual GLS_EXPORT std::istream&
ReadValue( std::istream& instr );
glsImageCodec
Definition: image.h:62
glsImageCodec Codec(int i)
Definition: display_frame.h:85
virtual std::ostream & WriteValue(std::ostream &outstr)
const char * TextureFilename(int i)
bool useGLTextureCompression
Definition: texture_palette.h:115
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
virtual std::istream & ReadValue(std::istream &instr)
float TextureCoordX(int i)
int FindAvailableSlot(void)
TextureState_e
Definition: texture_palette.h:63
Definition: dynamic_array.h:66
static bool DownsizeImage(Image *image, int desiredWidth, int desiredHeight)
The disti::DynamicArray class. A templated array of objects capable of dynamically growing...
bool SetTexture(int i, const char *filename, const Image::LoadOptions &options=Image::LoadOptions(), bool glTexCompress=false, bool allowNPOT=true, bool isLoadingDeferred=true)
TexturePaletteEntry * Entry(int i)
Definition: texture_palette.h:86
bool UseGLTextureCompression(int i)
int desiredLoadWidth
Definition: texture_palette.h:110
Definition: texture_palette.h:463
long compressedSize
Definition: texture_palette.h:107
Definition: gls_metadata_attributes.h:1703
Definition: texture_palette.h:65
virtual bool OkToWrite() const
Definition: texture_palette.h:471
Definition: gls_state_manager_interface.h:67
unsigned int Count() const
Definition: texture_palette.h:66
int compressionFactor
Definition: texture_palette.h:109
A file for all GL Studio files to include.
TexturePalette(int size=0)
Definition: texture_palette.h:70
The Image class. All textures are converted internally into Images.
void SetMipMap(int i, bool val)
void InvalidateTexture(int i)
Definition: texture_palette.h:68
bool allowNPOT
Definition: texture_palette.h:117
virtual DistiAttributeBase & operator=(const DistiAttributeBase &oldClass)
int sourceImageHeight
Definition: texture_palette.h:113
void InvalidateTextures(void)
float TextureCoordY(int i)
Definition: texture_palette.h:77
int sourceImageWidth
Definition: texture_palette.h:112
int sourceImageMemSize
Definition: texture_palette.h:114
Definition: disti_metadata.h:183
bool reverseAlpha
Definition: texture_palette.h:104
Definition: file_path_class.h:61
void PaletteSize(int newSize)
Definition: disti_metadata.h:665
Image * texture
Definition: texture_palette.h:106
Definition: texture_palette.h:479
Definition: callback_caller_base.h:55
virtual std::istream & ReadValue(std::istream &instr)
bool SetInlineTexture(int i, glsInlineImage &image, bool isLoadingDeferred=true)
long CompressedSize(int i)
bool DisableImageSharing(int index)
bool generateInline
Definition: texture_palette.h:103
Definition: texture_palette.h:145
void PreviewGenerated(int i)
void SetTexturePaletteCallback(void(*callback)(bool, int, DisplayFrame *), DisplayFrame *owningFrame)
bool isLoadingDeferred
Definition: texture_palette.h:105
unsigned int size() const
Definition: texture_palette.h:188
int CompressionFactor(int i)
glsImageCodec codec
Definition: texture_palette.h:108
Definition: disti_metadata.h:85
void DesiredLoadSize(int i, int width, int height)
Definition: bmpimage.h:46
TextureState_e TextureState(int i)
void DeleteTexture(int i)
int desiredLoadHeight
Definition: texture_palette.h:111
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: texture_palette.h:472
DynamicArray< TexturePaletteEntry > & palette
Definition: texture_palette.h:194
int FindTextureByName(const char *name)
bool GenerateInline(int i)