81 typedef const unsigned char*
const _BufferType;
97 unsigned int components,
98 unsigned int pixel_format,
101 bool gl_tex_compress,
102 unsigned long image_data_size,
103 unsigned long alpha_data_size,
104 unsigned int line_length,
105 const unsigned char*
const* rgb_buffer,
106 const unsigned char*
const* alpha_buffer )
109 , _components( components )
110 , _pixel_format( pixel_format )
113 , _gl_texture_compression( gl_tex_compress )
114 , _image_data_size( image_data_size )
115 , _alpha_data_size( alpha_data_size )
116 , _line_length( line_length )
117 , _rgb_buffer( rgb_buffer )
118 , _alpha_buffer( alpha_buffer )
205 unsigned int _stateManagerHandle;
265 virtual unsigned int StateManagerHandle()
const {
return _stateManagerHandle; }
268 virtual void StateManagerHandle(
unsigned int handle ) { _stateManagerHandle = handle; }
276 : _reverseAlpha( FALSE )
284 return ( _reverseAlpha == rhs._reverseAlpha );
297 GLS_EXPORT
FileID(
void );
308 GLS_EXPORT
FileID(
const FileID& src );
335 GLS_EXPORT
bool operator==(
const FileID& rhs )
const;
340 GLS_EXPORT FileID&
operator=(
const FileID& rhs );
444 virtual GLS_EXPORT
void Initialize(
int width,
int height,
int pixelSize );
453 virtual GLS_EXPORT
void SetError(
char* errorMessage );
456 virtual GLS_EXPORT
char*
GetError(
void );
459 virtual GLS_EXPORT
void Draw(
void );
465 virtual GLS_EXPORT
void Draw(
int x,
int y );
472 virtual GLS_EXPORT
unsigned char*
ImageData(
void );
491 virtual GLS_EXPORT
int Size(
void );
494 virtual GLS_EXPORT
int Width(
void );
497 virtual GLS_EXPORT
int Height(
void );
522 virtual GLS_EXPORT
int PixelSize(
void );
536 virtual GLS_EXPORT
void SetPixel(
int x,
int y,
float color[] );
556 GLS_EXPORT
Image(
const unsigned char*
const data,
int width,
int height,
int pixelFormat );
564 GLS_EXPORT
Image(
int width,
int height,
int pixelSize,
bool allowNPOT =
false );
582 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 );
594 GLS_EXPORT
Image(
int width,
int height,
int components,
int format,
const unsigned char*
const pix[],
unsigned long crcVal = 0,
int lineLength = 320 );
601 GLS_EXPORT
Image(
void );
603 GLS_EXPORT
void DoTexSubImage();
610 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:89
glsImageCodec
Definition: image.h:62
const int IMG_NON_TRANSPARENT
Definition: image.h:59
A class to handle file paths.
virtual void ScaleTexture(void)
unsigned long _crc
Definition: image.h:87
static bool _globalMipMapEnabled
Definition: image.h:214
virtual int operator==(Image &im)
virtual void BindTexture(void)
Definition: IFontImage.h:53
virtual void DeallocateTextureBinding(void)
bool _glTextureCompression
Definition: image.h:196
unsigned int _textureHandle
Definition: image.h:166
bool operator==(const FileID &rhs) const
glsImageCodec _codec
Definition: image.h:86
void ConvertLuminanceAlphaToAlpha()
time_t GetModTime(void) const
off_t _fileSize
Definition: image.h:351
time_t _modTime
Definition: image.h:352
const int MAX_MIP_MAP_IMAGES
Definition: image.h:60
virtual float TextureCoordX(void)
bool _gl_texture_compression
Definition: image.h:88
unsigned int _components
Definition: image.h:84
unsigned char * _mmBuf[MAX_MIP_MAP_IMAGES]
Definition: image.h:183
virtual unsigned long CrcValue()
virtual void SetError(char *errorMessage)
virtual void SetPixel(int x, int y, float color[])
bool _mipMap
Definition: image.h:182
DynamicArray< FileID > FileIDArray
Definition: image.h:356
virtual char * GetError(void)
virtual unsigned char * GetRasterPosition(int x, int y)
virtual unsigned int TextureHandle() const
Definition: image.h:503
virtual Image * FindDuplicate()
virtual void ReplaceImage(unsigned char *imageData)
void SetNPOTState(ImageNPOTMode state)
int _height
Definition: image.h:172
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:404
virtual bool DisconnectInlineImage(bool loadImage=true)
void DisassociateFileWithImage(const FileID &fileID)
unsigned int _pixel_format
Definition: image.h:85
int _pixelSize
Definition: image.h:168
bool ReloadImageFromFile(void)
bool GetReleaseImageDataDefault(void)
virtual int PixelSize(void)
int _errorFound
Definition: image.h:169
FilePathClass _path
Definition: image.h:349
bool _allowImageSharing
Definition: image.h:200
_BufferType * _alpha_buffer
Definition: image.h:93
virtual void Initialize(int width, int height, int pixelSize)
_BufferType * _rgb_buffer
Definition: image.h:92
float _texCoord[2]
Definition: image.h:176
virtual bool AllocatePixelMemory(bool zeroOut=true)
The List_c class. Generic linked list.
unsigned long _crcValue
Definition: image.h:185
static List_c & InstanceList()
virtual void CalculateMipMapImages(bool reCalc=false)
virtual bool GlTextureCompression()
Definition: gls_mutex.h:52
int _texWidth
Definition: image.h:173
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:83
virtual void SetTexWidthHeight(void)
Definition: file_path_class.h:61
FileIDArray _associatedFiles
Definition: image.h:405
unsigned int _line_length
Definition: image.h:91
FileID & operator=(const FileID &rhs)
unsigned long _alpha_data_size
Definition: image.h:90
virtual int ErrorFound(void)
glsInlineImage * _staticInlineImage
Definition: image.h:198
virtual void operator=(Image &im)
FileIDArray & GetAssociatedFiles(void)
int _width
Definition: image.h:171
int _pixelFormat
Definition: image.h:167
const int IMG_TRANSPARENT
Definition: image.h:58
void SetReleaseImageDataDefault(bool enable)
int _texHeight
Definition: image.h:174
char * _errorMessage
Definition: image.h:170
virtual char * PixelFormatString(void)
LoadOptions _loadOptions
Definition: image.h:350
bool _replaceImageFlag
Definition: image.h:189
bool _releaseImageData
Definition: image.h:191
int _numUsers
Definition: image.h:187
bool FileIsAssociatedWithImage(const FileID &fileID, FileID &foundFileID)
ImageNPOTMode
Definition: image.h:69
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)
bool IsReleaseImageDataEnabled()
virtual unsigned char * ImageData(void)
unsigned char * _rgbBuf
Definition: image.h:180
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:282
void SetReleaseImageDataEnabled(bool enable)
Definition: bmpimage.h:46
bool _allowNPOT
Definition: image.h:202
static bool _glTextureCompressionSupported
Definition: image.h:193
static void EmptyInstanceList()
virtual int TextureWidth(void)
unsigned int _width
Definition: image.h:82
virtual int PixelFormat(void)
const LoadOptions & GetLoadOptions(void) const