GL Studio C++ Runtime API
texture_palette.h
Go to the documentation of this file.
1/// \file texture_palette.h
2/// \brief The disti::TexturePalette class.
3///
4/// \par Copyright Information
5///
6/// Copyright (c) 2017 by The DiSTI Corporation.<br>
7/// 12249 Science Drive; Suite 300<br>
8/// Orlando, Florida 32826<br>
9/// USA<br>
10/// <br>
11/// All rights reserved.<br>
12///
13/// This Software contains proprietary trade secrets of DiSTI and may not be
14/// reproduced, in whole or part, in any form, or by any means of electronic,
15/// mechanical, or otherwise, without the written permission of DiSTI. Said
16/// permission may be derived through the purchase of applicable DiSTI product
17/// licenses which detail the distribution rights of this content and any
18/// Derivative Works based on this or other copyrighted DiSTI Software.
19///
20/// NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21/// AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22/// PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23/// AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24/// IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25/// PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26///
27/// LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28/// IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29/// INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30/// DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31/// INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32/// INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33/// OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34/// EXCEED FIVE DOLLARS (US$5.00).
35///
36/// The aforementioned terms and restrictions are governed by the laws of the
37/// State of Florida and the United States of America.
38
39#ifndef DISTI_INCLUDED_TEXTURE_PALETTE_H
40#define DISTI_INCLUDED_TEXTURE_PALETTE_H
41
42#include "disti_metadata.h"
43#include "dynamic_array.h"
44#include "gls_include.h"
46#include "image.h"
47#include <iostream>
48
49namespace disti
50{
51class FilePathClass;
52
53/// Objects with no texture have a palette index of -1.
54/// Valid texture indeces are zero through some positive number (no max).
55const int NO_TEXTURE = -1;
56
57/// When multiple textures are selected in the Texture Browser.
58/// It is defined here, because it must be different than NO_TEXTURE.
60
61/** Current state of texture in the texture palette */
62typedef enum
63{
64 TEXTURE_UNUSED, /**< The texture slot is unused */
65 TEXTURE_IGNORED, /**< Texture slot does not contain a texture,
66 the user choose to ignore it. It appears UNUSED for most purposes.*/
67 TEXTURE_INVALID, /**< Texture slot contains a texture, but it isn't
68 bound to the GL context */
69 TEXTURE_VALID /**< Texture slot contains a texture, and it is
70 bound to the GL context */
71
73
74/** Enumeration for an image compresion codec
75 */
77{
78public:
79 /// Constructor
80 /// \param callback The function pointer to call when this property changes.
81 /// \param name The name of the property to create.
82 /// \param attribPtr A pointer to the underlying property data.
84
86
88};
89
90/** A texture palette entry. Keeps track of which textures are assigned to
91 each entry in the texture palette */
93{
94 DistiAttribDict _attribDict;
95
96 TextureState_e status; /**< Status of the texture: UNUSED, INVALID, VALID, IGNORED */
97
98 FilePathClass* _filePath; /**< Path to the texture file */
99 char* _returned_filename; /**< Holds a pointer to the buffer returned by Filename() */
100 bool _supportsNPOTValue;
101
102 void SupportsAllowNPOT();
103
104 void InitMetadata();
105
106public:
107 static GLS_EXPORT bool _defaultGenerateInline; ///< Unused, kept for backward compatibility.
108
109 bool generateInline; ///< True if the image is to be generated as inline code.
110 bool reverseAlpha; ///< True if the alpha channel should be reversed on load.
111 bool isLoadingDeferred; ///< True if loading should be deferred until first draw.
112 Image* texture; ///< Pointer to the texture object itself.
113 long compressedSize; ///< Size of image when compressed with currently set inline CODEC.
114 glsImageCodec codec; ///< CODEC that will be used to compress an inline image.
115 int compressionFactor; ///< Compression factor of the image, used only for JPEG.
116 int desiredLoadWidth; ///< The width that the image should load at. 0 indicates full size. (Editor only)
117 int desiredLoadHeight; ///< The height that the image should load at. 0 indicates full size. (Editor only)
118 int sourceImageWidth; ///< The width of the source image. (pixels) (Editor only)
119 int sourceImageHeight; ///< The height of the source image. (pixels) (Editor only)
120 int sourceImageMemSize; ///< The size of the source image im memory. (bytes) (Editor only)
121 bool useGLTextureCompression; ///< True if the image should be generated to use hardware texture compression. (Editor only)
122
123 bool allowNPOT; ///< Allow Non-power of two texture (do not scale up).
124
126
127 /// Copy constructor
128 /// \param source The object to copy from.
130
132
133 /// Set up the default member values.
135
136 /// Assignment operator
137 /// \param source Tthe object to copy from.
138 /// \return The resulting object (this).
140
141 /// \return The texture load state.
142 TextureState_e TextureStatus() { return status; }
143
144 /// \return The filename relative to the current working directory.
145 GLS_EXPORT const char* Filename() const;
146
147 /// Set the file name relative to the current working directory.
148 /// \param name The new file name to set.
149 GLS_EXPORT void Filename( const char* name );
150
151 /// Sets the texture state to invalid.
153
154 /// Set the texture state to valid.
156
157 /// Sets texture to NULL and status to IGNORED.
159
160 /// \return True if there is no texture object (unused or ignored).
161 GLS_EXPORT bool IsEmpty() const;
162
163 /// \return True if ignored.
164 GLS_EXPORT bool IsIgnored() const;
165
166 /// \return True if invalid or valid (not unused or ignored).
167 GLS_EXPORT bool IsUsed() const;
168
169 /// Writes this object to a stream.
170 /// \param outstr The stream to write to.
171 /// \return The stream in its current state.
172 GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
173
174 /// Reads this object from a stream.
175 /// \param instr The stream to read from.
176 /// \return The stream in its current state.
177 GLS_EXPORT std::istream& ReadValue( std::istream& instr );
178};
179
180/** Texture Palette class. Stores a list of textures, each with its own
181 * texture handle. This the textures to be stored separately from the
182 * objects, which allows multiple objects to share the same textures.
183 */
185{
186 /** A texture of a single magenta pixel used for displaying textures that are not valid */
187 Image* _defaultTexture;
188
189 /** A callback that will get called when a texture in the palette has been update.
190 * \param bool True if it was added/update, false if it was removed
191 * \param int The index in the palette that was modified
192 * \param DisplayFrame The frame the palette belongs to
193 */
194 void ( *_paletteUpdateCallback )( bool, int, DisplayFrame* );
195
196 /// A callback invoked whenever a texture entry has updated its texture via SetTexture.
197 /// \param int The index in the palette that was updated.
198 /// \param DisplayFrame The frame the palette belongs to.
199 void ( *_setTextureCallback )( int, DisplayFrame* );
200
201 DisplayFrame* _owningDisplayFrame;
202
203 /** A dynamic array of TexturePaletteEntry */
205
206public:
207 /// \return True if the index \a i passed in is a valid texture index. Doesn't imply that a texture exists at that index,
208 /// merely that the index is within the array bounds of the texture palette.
209 /// \param i The index to check.
211
212 /** Create a new texture palette with the indicated number of entries
213 * \param size The number of entries in the palette
214 */
215 GLS_EXPORT explicit TexturePalette( int size = 0 );
216
217 /** Resize texture palette with the indicated number of entries
218 * \param newSize The new number of entries in the palette
219 */
220 GLS_EXPORT void PaletteSize( int newSize );
221
223
224 /// Assignment operator
225 /// \param source The object to copy from.
227
228 /// \return The texture palette entry at index i, expanding the palette to accomodate the index if needed.
229 /// \param i The index of the desired palette entry.
231
232 /// \return The number of textures (whether valid or not) in this texture palette.
233 /// \deprecated Renamed to Count() to match DynamicArray.
234 DISTI_DEPRECATED( "Renamed to Count() to match DynamicArray." )
235 unsigned int size() const { return Count(); }
236
237 /// \return The list of entries for this palette.
238 /// \deprecated Member data has been made private. Use accessor functions like Entry() and Count() instead.
239 DISTI_DEPRECATED( "Member data has been made private. Use accessor functions like Entry() and Count() instead." )
241
242 /// \return The number of textures (whether valid or not) in this texture palette.
243 GLS_EXPORT unsigned int Count() const;
244
245 /** Invalidates all of the textures in the palette, forcing them to be
246 * rebound the next time they are referenced by an object.
247 */
248 GLS_EXPORT void InvalidateTextures();
249
250 /** Finds an unused slot in the texture palette.
251 * \return The index of the first unused slot in the palette.
252 */
253 GLS_EXPORT int FindAvailableSlot();
254
255 /** Returns the filename associated with the texture at the given index.
256 * \param i The index to get the filename from
257 * \return The filename of the texture at that index
258 */
259 GLS_EXPORT const char* TextureFilename( int i );
260
261 /** Sets the filename associated with the texture at the given index.
262 * \param i The index to get the filename from
263 * \param filename The filename to set
264 */
265 GLS_EXPORT void TextureFilename( int i, const char* filename );
266
267 /// Sets the texture at the given index.
268 /// Attempts to load the texture from disk.
269 /// \param i The texture index to load the texture into.
270 /// \param filename The filename to set.
271 /// \param options Image load options (e.g. reverse alpha).
272 /// \param glTexCompress The GlTextureCompression setting for the new Image.
273 /// \param allowNPOT If the image is allowed to be non-power of two (NPOT).
274 /// \param isLoadingDeferred If true, the image will not be loaded from disk until bound.
275 /// \return TRUE if successful else FALSE.
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 );
277
278 /// Sets the texture at the given index using a TexturePaletteEntry structure.
279 /// This is generally only used in the Editor.
280 /// \param i The texture index to load the texture into.
281 /// \param entry Image generation options, NULL if not setting them.
282 /// \return TRUE if successful else FALSE.
283 GLS_EXPORT bool SetTexture( int i, TexturePaletteEntry* entry );
284
285 /// Sets the texture at the given index.
286 /// Does NOT attempt to load a file.
287 /// \param i The texture index to load the texture into.
288 /// \param image An image that will be the texture.
289 /// \return TRUE if successful else FALSE.
290 GLS_EXPORT bool SetTexture( int i, Image* image );
291
292 /// Sets the texture at the given index.
293 /// \param i The index to insert at.
294 /// \param image Structure containing the compressed image data.
295 /// \param isLoadingDeferred If true, the image will not be loaded from disk until bound.
296 /// \return true
297 GLS_EXPORT bool SetInlineTexture( int i, glsInlineImage& image, bool isLoadingDeferred = true );
298
299 /** Disables image sharing for the Image at the given index and
300 * ensures that the index refers to a unique Image instance.
301 * Note: If you want to disable image sharing for an Image that is not
302 * yet in a palette, you should call AllowImageSharing(false) on the Image.
303 * \param index The index of the texture to disable image sharing. The Image must already be loaded in the palette.
304 * \returns true on success
305 * \returns false on failure (Invalid index or Image could not be guarenteed unique)
306 */
307 GLS_EXPORT bool DisableImageSharing( int index );
308
309 /** Finds a texture based on its filename
310 * \param name The filename of the texture to find
311 * \return The index if found, -1 if not found
312 */
313 GLS_EXPORT int FindTextureByName( const char* name );
314
315 /** Gets the texture state of the texture at the given index.
316 * \param i The index to get the texture state from
317 * \return The state (UNUSED,VALID,INVALID) of the texture
318 */
319 GLS_EXPORT TextureState_e TextureState( int i );
320
321 /** Returns the width of the texture image in pixels
322 * \param i The index of the texture to get the width of
323 * \return The width of the texture image in pixels
324 */
325 GLS_EXPORT int Width( int i );
326
327 /** Returns the height of the texture image in pixels
328 * \param i The index of the texture to get the height of
329 * \return The height of the texture image in pixels
330 */
331 GLS_EXPORT int Height( int i );
332
333 /** Returns the power of two width of the texture image in pixels
334 * \param i The index of the texture to get the power of two width of
335 * \return The power of two width of the texture image in pixels
336 */
337 GLS_EXPORT int TextureWidth( int i );
338
339 /** Returns the power of two height of the texture image in pixels
340 * \param i The index of the texture to get the power of two height of
341 * \return The power of two height of the texture image in pixels
342 */
343 GLS_EXPORT int TextureHeight( int i );
344
345 /** Returns the Texture Coordinate of the upper right corner of the image
346 * computed as (Width/TextureWidth)
347 * \param i The index of the texture
348 * \return The Texture Coordinate of the upper right corner of the image
349 */
350 GLS_EXPORT float TextureCoordX( int i );
351
352 /** Returns the Texture Coordinate of the upper right corner of the image
353 * computed as (Height/TextureHeight)
354 * \param i The index of the texture
355 * \return The Texture Coordinate of the upper right corner of the image
356 */
357 GLS_EXPORT float TextureCoordY( int i );
358
359 /** Invalidate the texture at the given index, causing it to be rebound
360 * the next time it is referencd
361 * \param i The index of the texture
362 */
363 GLS_EXPORT void InvalidateTexture( int i );
364
365#ifdef GLES
366 /** Bind the texture at the given index, unless it is already bound. Set
367 * as the texture to be used for texturing polygons
368 * \param i The index of the texture
369 * \param stateManager
370 */
371 GLS_EXPORT void BindTexture( int i, IGlsStateManager* stateManager );
372#else
373 /** Bind the texture at the given index, unless it is already bound. Set
374 * as the texture to be used for texturing polygons
375 * \param i The index of the texture
376 */
377 GLS_EXPORT void BindTexture( int i );
378#endif
379
380 /** Return whether or not texture is bound
381 * \param i The index of the texture
382 * \return boolean result of whether or not texture is bound
383 */
385
386 /** Delete the texture at the given index. Mark the index as unused.
387 * \param i The index of the texture
388 */
390
391 /** Get a pointer to the texture at the given index.
392 * \param i The index of the texture
393 * \return The texture at that index. NULL if there is none.
394 */
396
397 /** \return True if the image is to be generated as inline code
398 * \param i The index of the texture
399 */
401
402 /** \return True if the image is to be generated to use OpenGL texture compression
403 * \param i The index of the texture
404 */
406
407 /** \return True if the image is allowed to be non power of two
408 * \param i The index of the texture
409 */
410 GLS_EXPORT bool AllowNPOT( int i );
411
412 /** \return Size of image when compressed with currently set inline CODEC
413 * \param i The index of the texture
414 */
416
417 /** \return CODEC that will be used to compress an inline image
418 * \param i The index of the texture
419 */
421
422 /** \return Compression factor of the image, used only for JPEG
423 * \param i The index of the texture
424 */
426
427 /** Set True if the image is to be generated as inline code
428 * \param i The index of the texture
429 * \param val
430 */
431 GLS_EXPORT void GenerateInline( int i, bool val );
432
433 /** Set True if the image is to be generated to use OpenGL texture compression
434 * \param i The index of the texture
435 * \param val
436 */
437 GLS_EXPORT void UseGLTextureCompression( int i, bool val );
438
439 /** Set True if the image is allowed to be non power of two
440 * \param i The index of the texture
441 * \param val the value to set allowing non-power of two (NPOT) functionality
442 */
443 GLS_EXPORT void AllowNPOT( int i, bool val );
444
445 /** Set Size of image when compressed with currently set inline CODEC
446 * \param i The index of the texture
447 * \param val
448 */
449 GLS_EXPORT void CompressedSize( int i, long val );
450
451 /** Set CODEC that will be used to compress an inline image
452 * \param i The index of the texture
453 * \param val The codec to set
454 * \param reload Whether or not to reload the image
455 */
456 GLS_EXPORT void Codec( int i, glsImageCodec val, bool reload = true );
457
458 /** Set Compression factor of the image, used only for JPEG
459 * \param i The index of the texture
460 * \param val
461 * \param reload
462 */
463 GLS_EXPORT void CompressionFactor( int i, int val, bool reload = true );
464
465 /** Sets the desired load size for the image.
466 * If the loaded image is larger than the specified dimensions,
467 * it will be scaled down during the load.
468 * \param i The index of the texture
469 * \param width The desired width
470 * \param height The desired height
471 */
472 GLS_EXPORT void DesiredLoadSize( int i, int width, int height );
473
474 /** Reload a texture from disk, then downsize and compress it using the current settings
475 * of the TexturePaletteEntry
476 * \param i The index of the texture to reload
477 */
478 GLS_EXPORT void Reload( int i );
479
480 /** Set mip-mapping state for given texture
481 * \param i The index of the texture to set mipmapping for
482 * \param val The mipmapping state to set
483 */
484 GLS_EXPORT void SetMipMap( int i, bool val );
485
486 /// Compress using the current compression settings for the texture
487 /// and scale down to the DesiredLoadSize.
488 /// \param i The index of the texture.
489 /// \deprecated Previews are editor only functionality. This function no longer does anything.
491
492 /** Sets up for a callback to be used for reacting to the texture palette items and filenames to be updated.
493 * \param callback A function accepting whether the texture was added/modified(true) or removed(false), the index of it, and the frame this palette belongs to.
494 * \param owningFrame The display frame that this texture palette belongs to.
495 */
496 GLS_EXPORT void SetTexturePaletteCallback( void ( *callback )( bool, int, DisplayFrame* ), DisplayFrame* owningFrame );
497
498 /// Sets up for a callback to be used for reacting whenever a texture data was updated.
499 /// \param callback A function invoked whenever a texture data was updated. Its parameters are index of the updated texture and the frame this palette belongs to.
500 GLS_EXPORT void SetTextureCallback( void ( *callback )( int, DisplayFrame* ) );
501
502 /// Scales down an image to the next power-of-two size where (width <= desiredWidth || height <= desiredHeight), maintains aspect ratio.
503 /// \note This method may be removed from the TexturePalette in the future.
504 /// \param image The image to scale down.
505 /// \param desiredWidth The target width in pixels.
506 /// \param desiredHeight The target height in pixels.
507 /// \return True if operation is successful.
508 static GLS_EXPORT bool DownsizeImage( Image* image, int desiredWidth, int desiredHeight );
509
510 /** The DistiAttributeTexturePalette class for version 2.1 and older (read only). Included for
511 * backwards compatibility with v 2.1
512 */
514 {
515 TexturePalette** _palette;
516
517 public:
518 /// Constructor
519 /// \param palette A pointer to the underlying data.
521
522 // This atttribute is never written
523 bool OkToWrite() const DISTI_METHOD_OVERRIDE { return false; }
524 std::ostream& WriteValue( std::ostream& outstr ) DISTI_METHOD_OVERRIDE { return outstr; }
525
526 GLS_EXPORT std::istream& ReadValue( std::istream& instr ) DISTI_METHOD_OVERRIDE;
527
529 };
530
531 /** The DistiAttributeTexturePalette class for version 3.0 and later
532 */
534 {
535 TexturePalette** _palette;
536
537 public:
538 /// Constructor
539 /// \param palette A pointer to the underlying data.
541
542 GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr ) DISTI_METHOD_OVERRIDE;
543 GLS_EXPORT std::istream& ReadValue( std::istream& instr ) DISTI_METHOD_OVERRIDE;
544
546
547 DISTI_EXPORT DistiAttributeBase& operator=( const DistiAttributeBase& oldClass ) DISTI_METHOD_OVERRIDE;
548 };
549};
550
551} // namespace disti
552
553#endif
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: image.h:176
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)
bool OkToWrite() const override
Definition: texture_palette.h:523
std::istream & ReadValue(std::istream &instr) override
std::ostream & WriteValue(std::ostream &outstr) override
Definition: texture_palette.h:524
std::istream & ReadValue(std::istream &instr) override
DistiAttributeTexturePalette(TexturePalette **palette)
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)
void BindTexture(int i)
glsImageCodec Codec(int i)
long CompressedSize(int i)
void CompressedSize(int i, long val)
int CompressionFactor(int i)
bool IsValidIndex(int i)
bool UseGLTextureCompression(int i)
void GenerateInline(int i, bool val)
Image * Texture(int i)
The disti metadata.
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
Defines templated metadata classes for DisplayObjects and other uses.
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
Definition: image.h:80