39#ifndef DISTI_INCLUDED_TEXTURE_PALETTE_H
40#define DISTI_INCLUDED_TEXTURE_PALETTE_H
99 char* _returned_filename;
100 bool _supportsNPOTValue;
102 void SupportsAllowNPOT();
187 Image* _defaultTexture;
194 void ( *_paletteUpdateCallback )( bool, int,
DisplayFrame* );
235 unsigned
int size()
const {
return Count(); }
239 DISTI_DEPRECATED(
"Member data has been made private. Use accessor functions like Entry() and Count() instead." )
265 GLS_EXPORT void TextureFilename(
int i, const
char* filename );
276 GLS_EXPORT bool SetTexture(
int i, const
char* filename, const
Image::LoadOptions& options =
Image::LoadOptions(),
bool glTexCompress = false,
bool allowNPOT = true,
bool isLoadingDeferred = true );
Definition: disti_metadata.h:87
Definition: callback_caller_base.h:55
Definition: display_frame.h:86
Definition: disti_metadata.h:750
Definition: disti_metadata.h:220
Definition: gls_metadata_attributes.h:1789
Definition: texture_palette.h:77
std::string Type() const override
DistiAttributeImageCodecEnum(CallbackMethodCallerBase *callback, const AttributeName &name, glsImageCodec *attribPtr)
Definition: dynamic_array.h:79
Definition: file_path_class.h:62
Definition: gls_state_manager_interface.h:65
Definition: texture_palette.h:93
int compressionFactor
Compression factor of the image, used only for JPEG.
Definition: texture_palette.h:115
int desiredLoadWidth
The width that the image should load at. 0 indicates full size. (Editor only)
Definition: texture_palette.h:116
bool reverseAlpha
True if the alpha channel should be reversed on load.
Definition: texture_palette.h:110
long compressedSize
Size of image when compressed with currently set inline CODEC.
Definition: texture_palette.h:113
bool isLoadingDeferred
True if loading should be deferred until first draw.
Definition: texture_palette.h:111
const char * Filename() const
TexturePaletteEntry(const TexturePaletteEntry &source)
int desiredLoadHeight
The height that the image should load at. 0 indicates full size. (Editor only)
Definition: texture_palette.h:117
void Filename(const char *name)
void Validate()
Set the texture state to valid.
static bool _defaultGenerateInline
Unused, kept for backward compatibility.
Definition: texture_palette.h:107
bool useGLTextureCompression
True if the image should be generated to use hardware texture compression. (Editor only)
Definition: texture_palette.h:121
int sourceImageMemSize
The size of the source image im memory. (bytes) (Editor only)
Definition: texture_palette.h:120
int sourceImageWidth
The width of the source image. (pixels) (Editor only)
Definition: texture_palette.h:118
void Initialize()
Set up the default member values.
int sourceImageHeight
The height of the source image. (pixels) (Editor only)
Definition: texture_palette.h:119
void Invalidate()
Sets the texture state to invalid.
Image * texture
Pointer to the texture object itself.
Definition: texture_palette.h:112
bool allowNPOT
Allow Non-power of two texture (do not scale up).
Definition: texture_palette.h:123
void Ignore()
Sets texture to NULL and status to IGNORED.
glsImageCodec codec
CODEC that will be used to compress an inline image.
Definition: texture_palette.h:114
std::istream & ReadValue(std::istream &instr)
std::ostream & WriteValue(std::ostream &outstr)
bool generateInline
True if the image is to be generated as inline code.
Definition: texture_palette.h:109
TextureState_e TextureStatus()
Definition: texture_palette.h:142
TexturePaletteEntry & operator=(const TexturePaletteEntry &source)
Definition: texture_palette.h:514
bool OkToWrite() const override
Definition: texture_palette.h:523
DistiAttributeTexturePalette_V21(TexturePalette **palette)
std::istream & ReadValue(std::istream &instr) override
std::string Type() const override
std::ostream & WriteValue(std::ostream &outstr) override
Definition: texture_palette.h:524
Definition: texture_palette.h:534
std::istream & ReadValue(std::istream &instr) override
DistiAttributeTexturePalette(TexturePalette **palette)
std::string Type() const override
std::ostream & WriteValue(std::ostream &outstr) override
Definition: texture_palette.h:185
void PaletteSize(int newSize)
void SetTexturePaletteCallback(void(*callback)(bool, int, DisplayFrame *), DisplayFrame *owningFrame)
void UseGLTextureCompression(int i, bool val)
void DesiredLoadSize(int i, int width, int height)
void Codec(int i, glsImageCodec val, bool reload=true)
static bool DownsizeImage(Image *image, int desiredWidth, int desiredHeight)
TexturePaletteEntry * Entry(int i)
void operator=(TexturePalette &source)
void SetMipMap(int i, bool val)
void CompressionFactor(int i, int val, bool reload=true)
bool GenerateInline(int i)
TexturePalette(int size=0)
void DeleteTexture(int i)
void PreviewGenerated(int i)
void SetTextureCallback(void(*callback)(int, DisplayFrame *))
void AllowNPOT(int i, bool val)
glsImageCodec Codec(int i)
long CompressedSize(int i)
void CompressedSize(int i, long val)
int CompressionFactor(int i)
bool UseGLTextureCompression(int i)
void GenerateInline(int i, bool val)
The disti::DynamicArray class. A templated array of objects capable of dynamically growing.
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:487
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:221
A file for all GL Studio files to include.
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:50
The Image class. All textures are converted internally into Images.
Definition: bmpimage.h:46
const int MULTIPLE_TEXTURES_SELECTED
Definition: texture_palette.h:59
glsImageCodec
Definition: image.h:62
TextureState_e
Definition: texture_palette.h:63
@ TEXTURE_INVALID
Definition: texture_palette.h:67
@ TEXTURE_VALID
Definition: texture_palette.h:69
@ TEXTURE_UNUSED
Definition: texture_palette.h:64
@ TEXTURE_IGNORED
Definition: texture_palette.h:65
const int NO_TEXTURE
Definition: texture_palette.h:55