112 unsigned int components,
113 unsigned int pixel_format,
116 bool gl_tex_compress,
117 unsigned long image_data_size,
118 unsigned long alpha_data_size,
119 unsigned int line_length,
120 const unsigned char*
const* rgb_buffer,
121 const unsigned char*
const* alpha_buffer )
219 unsigned int _stateManagerHandle;
278 virtual unsigned int StateManagerHandle()
const {
return _stateManagerHandle; }
281 virtual void StateManagerHandle(
unsigned int handle ) { _stateManagerHandle = handle; }
571 GLS_EXPORT Image(
const unsigned char*
const data,
int width,
int height,
int pixelFormat );
597 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 );
609 GLS_EXPORT Image(
int width,
int height,
int components,
int format,
const unsigned char*
const pix[],
unsigned long crcVal = 0,
int lineLength = 320 );
Definition: file_path_class.h:63
Definition: IFontImage.h:54
FilePathClass _path
Definition: image.h:365
static FilePathClass GetAbsoluteFilePath(const FilePathClass &imgPath)
off_t _fileSize
Definition: image.h:367
time_t GetModTime() const
bool operator==(const FileID &rhs) const
LoadOptions _loadOptions
Definition: image.h:366
time_t _modTime
Definition: image.h:368
off_t GetFileSize() const
const LoadOptions & GetLoadOptions() const
FileID(const FilePathClass &path, const LoadOptions &loadOptions)
FileID(const FileID &src)
FileID & operator=(const FileID &rhs)
const FilePathClass & GetPath() const
Image * _img
Definition: image.h:420
InstanceListEntry(Image *img, const FilePathClass &imgPath=FilePathClass(), const LoadOptions &imgLoadOptions=LoadOptions())
bool FileIsAssociatedWithImage(const FileID &fileID, FileID &foundFileID)
bool ReloadImageFromFile()
DynamicArray< FileID > FileIDArray
Definition: image.h:372
void DisassociateFileWithImage(const FileID &fileID)
FileIDArray _associatedFiles
Definition: image.h:421
void AssociateFileWithImage(const FileID &fileID)
FileIDArray & GetAssociatedFiles()
bool operator==(const LoadOptions &rhs) const
Definition: image.h:298
bool _reverseAlpha
For compatibility with images with the alpha channel reversed.
Definition: image.h:293
virtual bool LoadInlineImageData()
void ConvertLuminanceAlphaToAlpha()
int _errorFound
Definition: image.h:183
virtual unsigned char * ImageData()
bool IsReleaseImageDataEnabled()
void SetReleaseImageDataEnabled(bool enable)
virtual void DeleteUsage()
virtual void SetError(char *errorMessage)
int _pixelSize
Definition: image.h:182
virtual unsigned long CrcValue()
virtual int TextureHeight()
virtual Image * FindDuplicate()
bool _mipMap
Definition: image.h:196
virtual void ScaleToPowerOfTwo()
Image(const glsInlineImage &image)
static Image * FindDuplicate(int width, int height, int components, unsigned long crcVal, bool glTexCompress)
virtual int operator==(Image &im)
virtual bool AllocateMipMapMemory(bool zeroOut=true)
virtual void operator=(Image &im)
bool _allowNPOT
Definition: image.h:216
bool IsAllowNPOTTextures() const
virtual bool ReplaceImage(unsigned char *imageData, int width, int height, int pixelSize)
Image(const unsigned char *const data, int width, int height, int pixelFormat)
float _texCoord[2]
Definition: image.h:190
virtual void SetTexWidthHeight()
static List_c & InstanceList()
virtual unsigned char * GetRasterPosition(int x, int y)
virtual void Draw(int x, int y)
virtual bool TextureHandleValid()
virtual void DeallocateTextureBinding()
bool _releaseImageData
Definition: image.h:205
virtual void PixelFormat(int format)
virtual int TextureWidth()
virtual void ReplaceImage(unsigned char *imageData)
virtual bool DisconnectInlineImage(bool loadImage=true)
virtual void GlTextureCompression(bool set)
int _numUsers
Definition: image.h:201
void AddSelfToInstanceList()
unsigned char * _rgbBuf
Definition: image.h:194
virtual bool FreeInlineImageData()
virtual char * GetError()
int _pixelFormat
Definition: image.h:181
virtual void MipMap(bool set)
Image(const Image &source)
static bool _glTextureCompressionSupported
Definition: image.h:207
static void EmptyInstanceList()
virtual void AllocateTextureBinding()
Image(int width, int height, int components, int format, unsigned int comprLen, const unsigned char *const data[], unsigned long crcVal=0, int lineLength=320)
unsigned int _textureHandle
Definition: image.h:180
bool _replaceImageFlag
Definition: image.h:203
unsigned long _crcValue
Definition: image.h:199
virtual char * PixelFormatString()
glsInlineImage * _staticInlineImage
Definition: image.h:212
virtual float TextureCoordX()
virtual float TextureCoordY()
virtual void ScaleTexture()
void DoTexSubImage()
Perform the upload process from the CPU to the GPU.
unsigned char * _mmBuf[MAX_MIP_MAP_IMAGES]
Definition: image.h:197
virtual void CalculateMipMapImages(bool reCalc=false)
virtual unsigned int TextureHandle() const
Definition: image.h:520
int _texWidth
Definition: image.h:187
virtual void SetAsCurrentTexture()
char * _errorMessage
Definition: image.h:184
virtual int PixelFormat()
static disti::Mutex & InstanceListMutex()
int _texHeight
Definition: image.h:188
Image(int width, int height, int pixelSize, bool allowNPOT=false)
static bool IsDuplicate(Image *image, int width, int height, int components, unsigned long crcVal, bool glTexCompress)
virtual bool AllowImageSharing()
bool _allowImageSharing
Definition: image.h:214
int _height
Definition: image.h:186
Image(int width, int height, int components, int format, const unsigned char *const pix[], unsigned long crcVal=0, int lineLength=320)
virtual void SetPixel(int x, int y, float color[])
bool _glTextureCompression
Definition: image.h:210
virtual bool GlTextureCompression()
static bool _globalMipMapEnabled
Definition: image.h:228
virtual void BindTexture()
virtual bool AllocatePixelMemory(bool zeroOut=true)
int _width
Definition: image.h:185
virtual void AllowImageSharing(bool value)
virtual void Initialize(int width, int height, int pixelSize)
Definition: gls_mutex.h:53
A class to handle file paths.
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 List_c class. Generic linked list.
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
ImageNPOTMode
Definition: image.h:72
@ GLS_NPOT_DISABLED
Definition: image.h:75
@ GLS_NPOT_ENABLED
Definition: image.h:74
@ GLS_NPOT_AUTO
Definition: image.h:73
void SetNPOTState(ImageNPOTMode state)
ImageNPOTMode DoesSystemSupportNPOT()
glsImageCodec
Definition: image.h:64
@ GLS_CODEC_JPEG
Definition: image.h:67
@ GLS_CODEC_LZ77
Definition: image.h:66
@ GLS_CODEC_RAW
Definition: image.h:65
void SetReleaseImageDataDefault(bool enable)
const int IMG_NON_TRANSPARENT
Definition: image.h:59
const int MAX_MIP_MAP_IMAGES
Definition: image.h:60
bool GetReleaseImageDataDefault()
const int IMG_TRANSPARENT
Definition: image.h:58
glsImageCodec _codec
CODEC used to compress image.
Definition: image.h:88
_BufferType * _alpha_buffer
Pointer to the static compressed alpha layer for the image.
Definition: image.h:95
unsigned int _pixel_format
GL_RGB, GL_RGBA ...
Definition: image.h:87
unsigned long _image_data_size
Size of RGB data (compressed).
Definition: image.h:91
const unsigned char *const _BufferType
Typedef for the type of buffer used by images.
Definition: image.h:83
_BufferType * _rgb_buffer
Pointer to the static compressed rgb buffer for the image.
Definition: image.h:94
glsInlineImage(unsigned int width, unsigned int height, unsigned int components, unsigned int pixel_format, glsImageCodec codec, unsigned long crc, bool gl_tex_compress, unsigned long image_data_size, unsigned long alpha_data_size, unsigned int line_length, const unsigned char *const *rgb_buffer, const unsigned char *const *alpha_buffer)
Definition: image.h:110
unsigned int _width
Width of image in pixels.
Definition: image.h:84
unsigned int _height
Height of image in pixels.
Definition: image.h:85
unsigned int _components
Number of components in image.
Definition: image.h:86
unsigned long _alpha_data_size
Size of Alpha data (compressed). Zero if no alpha channel present.
Definition: image.h:92
unsigned int _line_length
Length of each line of inline data, in bytes.
Definition: image.h:93
unsigned long _crc
CRC of image data (compressed or uncompressed?).
Definition: image.h:89
bool _gl_texture_compression
Value of GlTextureCompression.
Definition: image.h:90
Generally useful defines, macros, enumerations and function prototypes.
#define FALSE
False macro, for backward compatibility purposes.
Definition: util.h:107