40#ifndef _TEXTURE_PALETTE_H
41#define _TEXTURE_PALETTE_H
98 char* _returned_filename;
99 bool _supportsNPOTValue;
101 void SupportsAllowNPOT();
186 Image* _defaultTexture;
193 void ( *_paletteUpdateCallback )( bool, int,
DisplayFrame* );
233 DISTI_DEPRECATED(
"Member data has been made private. Use accessor functions like Entry() and Count() instead." )
270 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:56
Definition: display_frame.h:87
Definition: disti_metadata.h:734
Definition: disti_metadata.h:220
Definition: gls_metadata_attributes.h:1976
Definition: texture_palette.h:78
DistiAttributeImageCodecEnum(CallbackMethodCallerBase *callback, const AttributeName &name, glsImageCodec *attribPtr)
Definition: dynamic_array.h:79
Definition: file_path_class.h:63
Definition: gls_state_manager_interface.h:69
Definition: texture_palette.h:92
int compressionFactor
Compression factor of the image, used only for JPEG.
Definition: texture_palette.h:114
int desiredLoadWidth
The width that the image should load at. 0 indicates full size. (Editor only)
Definition: texture_palette.h:115
bool reverseAlpha
True if the alpha channel should be reversed on load.
Definition: texture_palette.h:109
long compressedSize
Size of image when compressed with currently set inline CODEC.
Definition: texture_palette.h:112
bool isLoadingDeferred
True if loading should be deferred until first draw.
Definition: texture_palette.h:110
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:116
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:106
bool useGLTextureCompression
True if the image should be generated to use hardware texture compression. (Editor only)
Definition: texture_palette.h:120
int sourceImageMemSize
The size of the source image im memory. (bytes) (Editor only)
Definition: texture_palette.h:119
int sourceImageWidth
The width of the source image. (pixels) (Editor only)
Definition: texture_palette.h:117
void Initialize()
Set up the default member values.
int sourceImageHeight
The height of the source image. (pixels) (Editor only)
Definition: texture_palette.h:118
void Invalidate()
Sets the texture state to invalid.
Image * texture
Pointer to the texture object itself.
Definition: texture_palette.h:111
bool allowNPOT
Allow Non-power of two texture (do not scale up).
Definition: texture_palette.h:122
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:113
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:108
TextureState_e TextureStatus()
Definition: texture_palette.h:141
TexturePaletteEntry & operator=(const TexturePaletteEntry &source)
Definition: texture_palette.h:504
DistiAttributeTexturePalette_V21(TexturePalette **palette)
virtual std::istream & ReadValue(std::istream &instr) override
virtual bool OkToWrite() const override
Definition: texture_palette.h:513
virtual std::ostream & WriteValue(std::ostream &outstr) override
Definition: texture_palette.h:514
Definition: texture_palette.h:522
DistiAttributeTexturePalette(TexturePalette **palette)
virtual std::istream & ReadValue(std::istream &instr) override
virtual DistiAttributeBase & operator=(const DistiAttributeBase &oldClass) override
virtual std::ostream & WriteValue(std::ostream &outstr) override
Definition: texture_palette.h:184
void PaletteSize(int newSize)
void SetTexturePaletteCallback(void(*callback)(bool, int, DisplayFrame *), DisplayFrame *owningFrame)
void UseGLTextureCompression(int i, bool val)
bool SetTexture(int i, const char *filename, const Image::LoadOptions &options=Image::LoadOptions(), bool glTexCompress=false, bool allowNPOT=true, bool isLoadingDeferred=true)
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)
int FindTextureByName(const char *name)
void SetMipMap(int i, bool val)
void CompressionFactor(int i, int val, bool reload=true)
bool GenerateInline(int i)
bool DisableImageSharing(int index)
unsigned int Count() const
TexturePalette(int size=0)
void DeleteTexture(int i)
float TextureCoordX(int i)
void PreviewGenerated(int i)
unsigned int size() const
Definition: texture_palette.h:229
void AllowNPOT(int i, bool val)
DynamicArray< TexturePaletteEntry > & palette
Definition: texture_palette.h:234
void InvalidateTexture(int i)
glsImageCodec Codec(int i)
TextureState_e TextureState(int i)
long CompressedSize(int i)
float TextureCoordY(int i)
void CompressedSize(int i, long val)
bool SetInlineTexture(int i, glsInlineImage &image, bool isLoadingDeferred=true)
void InvalidateTextures()
int CompressionFactor(int i)
bool UseGLTextureCompression(int i)
void GenerateInline(int i, bool val)
const char * TextureFilename(int i)
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:457
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:214
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:52
The Image class. All textures are converted internally into Images.
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
const int MULTIPLE_TEXTURES_SELECTED
Definition: texture_palette.h:60
glsImageCodec
Definition: image.h:64
TextureState_e
Definition: texture_palette.h:64
@ TEXTURE_INVALID
Definition: texture_palette.h:68
@ TEXTURE_VALID
Definition: texture_palette.h:70
@ TEXTURE_UNUSED
Definition: texture_palette.h:65
@ TEXTURE_IGNORED
Definition: texture_palette.h:66
const int NO_TEXTURE
Definition: texture_palette.h:56