78 typedef const unsigned char*
const _BufferType;
94 unsigned int components,
95 unsigned int pixel_format,
99 unsigned long image_data_size,
100 unsigned long alpha_data_size,
101 unsigned int line_length,
102 const unsigned char*
const* rgb_buffer,
103 const unsigned char*
const* alpha_buffer):
106 _components(components),
107 _pixel_format(pixel_format),
110 _gl_texture_compression(gl_tex_compress),
111 _image_data_size(image_data_size),
112 _alpha_data_size(alpha_data_size),
113 _line_length(line_length),
114 _rgb_buffer(rgb_buffer),
115 _alpha_buffer(alpha_buffer)
203 unsigned int _stateManagerHandle;
264 virtual unsigned int StateManagerHandle()
const {
return _stateManagerHandle; }
267 virtual void StateManagerHandle(
unsigned int handle ) { _stateManagerHandle = handle; }
282 return( _reverseAlpha == rhs._reverseAlpha );
295 GLS_EXPORT
FileID(
void );
306 GLS_EXPORT
FileID(
const FileID &src );
333 GLS_EXPORT
bool operator==(
const FileID &rhs )
const;
338 GLS_EXPORT FileID&
operator=(
const FileID &rhs );
442 virtual GLS_EXPORT
void Initialize(
int width,
int height,
int pixelSize);
452 virtual GLS_EXPORT
void SetError(
char *errorMessage);
455 virtual GLS_EXPORT
char *
GetError(
void);
458 virtual GLS_EXPORT
void Draw(
void);
464 virtual GLS_EXPORT
void Draw(
int x,
int y);
471 virtual GLS_EXPORT
unsigned char *
ImageData(
void);
490 virtual GLS_EXPORT
int Size(
void);
493 virtual GLS_EXPORT
int Width(
void);
496 virtual GLS_EXPORT
int Height(
void);
535 virtual GLS_EXPORT
void SetPixel(
int x,
int y,
float color[]);
555 GLS_EXPORT
Image(
const unsigned char*
const data,
int width,
int height,
int pixelFormat);
563 GLS_EXPORT
Image(
int width,
int height,
int pixelSize,
bool allowNPOT =
false);
581 GLS_EXPORT
Image(
int width,
int height,
int components,
int format,
unsigned int comprLen,
const unsigned char*
const data[],
unsigned long crcVal = 0,
int lineLength=320);
593 GLS_EXPORT
Image(
int width,
int height,
int components,
int format,
const unsigned char*
const pix[],
unsigned long crcVal = 0,
int lineLength=320);
600 GLS_EXPORT
Image(
void);
602 GLS_EXPORT
void DoTexSubImage();
609 virtual GLS_EXPORT
~Image(
void);
630 virtual GLS_EXPORT
unsigned long CrcValue();
647 static GLS_EXPORT
bool IsDuplicate(
Image *image,
int width,
int height,
int components,
unsigned long crcVal,
bool glTexCompress);
662 static GLS_EXPORT
Image*
FindDuplicate(
int width,
int height,
int components,
unsigned long crcVal,
bool glTexCompress);
667 virtual GLS_EXPORT
void MipMap(
bool set);
670 virtual GLS_EXPORT
bool MipMap();
686 virtual GLS_EXPORT
void ReplaceImage(
unsigned char *imageData);
695 virtual GLS_EXPORT
bool ReplaceImage(
unsigned char *imageData,
int width,
int height,
int pixelSize);
727 virtual GLS_EXPORT
void AllowImageSharing(
bool value);
728 virtual GLS_EXPORT
bool AllowImageSharing();
unsigned long _image_data_size
Definition: image.h:86
glsImageCodec
Definition: image.h:59
const int IMG_NON_TRANSPARENT
Definition: image.h:56
A class to handle file paths.
virtual void ScaleTexture(void)
unsigned long _crc
Definition: image.h:84
static bool _globalMipMapEnabled
Definition: image.h:213
virtual int operator==(Image &im)
virtual void BindTexture(void)
Definition: IFontImage.h:54
virtual void DeallocateTextureBinding(void)
bool _glTextureCompression
Definition: image.h:194
unsigned int _textureHandle
Definition: image.h:164
bool operator==(const FileID &rhs) const
glsImageCodec _codec
Definition: image.h:83
void ConvertLuminanceAlphaToAlpha()
time_t GetModTime(void) const
off_t _fileSize
Definition: image.h:349
time_t _modTime
Definition: image.h:350
const int MAX_MIP_MAP_IMAGES
Definition: image.h:57
virtual float TextureCoordX(void)
bool _gl_texture_compression
Definition: image.h:85
unsigned int _components
Definition: image.h:81
unsigned char * _mmBuf[MAX_MIP_MAP_IMAGES]
Definition: image.h:181
virtual unsigned long CrcValue()
virtual void SetError(char *errorMessage)
virtual void SetPixel(int x, int y, float color[])
bool _mipMap
Definition: image.h:180
virtual char * GetError(void)
virtual unsigned char * GetRasterPosition(int x, int y)
virtual unsigned int TextureHandle() const
Definition: image.h:502
virtual Image * FindDuplicate()
virtual void ReplaceImage(unsigned char *imageData)
void SetNPOTState(ImageNPOTMode state)
int _height
Definition: image.h:170
virtual void ScaleToPowerOfTwo(void)
virtual bool TextureHandleValid()
virtual float TextureCoordY(void)
A file for all GL Studio files to include.
Image * _img
Definition: image.h:402
virtual bool DisconnectInlineImage(bool loadImage=true)
void DisassociateFileWithImage(const FileID &fileID)
unsigned int _pixel_format
Definition: image.h:82
int _pixelSize
Definition: image.h:166
bool ReloadImageFromFile(void)
bool GetReleaseImageDataDefault(void)
virtual int PixelSize(void)
int _errorFound
Definition: image.h:167
FilePathClass _path
Definition: image.h:347
bool _allowImageSharing
Definition: image.h:198
_BufferType * _alpha_buffer
Definition: image.h:90
virtual void Initialize(int width, int height, int pixelSize)
_BufferType * _rgb_buffer
Definition: image.h:89
float _texCoord[2]
Definition: image.h:174
virtual bool AllocatePixelMemory(bool zeroOut=true)
The List_c class. Generic linked list.
unsigned long _crcValue
Definition: image.h:183
static List_c & InstanceList()
virtual void CalculateMipMapImages(bool reCalc=false)
virtual bool GlTextureCompression()
Definition: gls_mutex.h:53
int _texWidth
Definition: image.h:171
Generally useful defines, macros, enumerations and function prototypes.
const FilePathClass & GetPath(void) const
static disti::Mutex & InstanceListMutex()
virtual bool LoadInlineImageData()
bool IsAllowNPOTTextures(void) const
unsigned int _height
Definition: image.h:80
virtual void SetTexWidthHeight(void)
Definition: file_path_class.h:60
FileIDArray _associatedFiles
Definition: image.h:403
unsigned int _line_length
Definition: image.h:88
FileID & operator=(const FileID &rhs)
unsigned long _alpha_data_size
Definition: image.h:87
virtual int ErrorFound(void)
glsInlineImage * _staticInlineImage
Definition: image.h:196
virtual void operator=(Image &im)
FileIDArray & GetAssociatedFiles(void)
int _width
Definition: image.h:169
int _pixelFormat
Definition: image.h:165
const int IMG_TRANSPARENT
Definition: image.h:55
void SetReleaseImageDataDefault(bool enable)
int _texHeight
Definition: image.h:172
char * _errorMessage
Definition: image.h:168
virtual char * PixelFormatString(void)
LoadOptions _loadOptions
Definition: image.h:348
bool _replaceImageFlag
Definition: image.h:187
bool _releaseImageData
Definition: image.h:189
int _numUsers
Definition: image.h:185
bool FileIsAssociatedWithImage(const FileID &fileID, FileID &foundFileID)
ImageNPOTMode
Definition: image.h:66
static bool IsDuplicate(Image *image, int width, int height, int components, unsigned long crcVal, bool glTexCompress)
virtual bool FreeInlineImageData()
InstanceListEntry(Image *img, const FilePathClass &imgPath=FilePathClass(), const LoadOptions &imgLoadOptions=LoadOptions())
virtual bool AllocateMipMapMemory(bool zeroOut=true)
DynamicArray< FileID, false > FileIDArray
Definition: image.h:354
bool IsReleaseImageDataEnabled()
virtual unsigned char * ImageData(void)
unsigned char * _rgbBuf
Definition: image.h:178
static FilePathClass GetAbsoluteFilePath(const FilePathClass &imgPath)
virtual void DeleteUsage()
off_t GetFileSize(void) const
virtual void SetAsCurrentTexture(void)
virtual void AllocateTextureBinding(void)
void AssociateFileWithImage(const FileID &fileID)
virtual int TextureHeight(void)
ImageNPOTMode DoesSystemSupportNPOT()
void AddSelfToInstanceList()
bool operator==(const LoadOptions &rhs) const
Definition: image.h:280
void SetReleaseImageDataEnabled(bool enable)
Definition: bmpimage.h:46
bool _allowNPOT
Definition: image.h:200
static bool _glTextureCompressionSupported
Definition: image.h:191
static void EmptyInstanceList()
virtual int TextureWidth(void)
unsigned int _width
Definition: image.h:79
virtual int PixelFormat(void)
const LoadOptions & GetLoadOptions(void) const