Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
ImageData Struct Reference

Structure holding the Raw Pixel Data and minimum image info. More...

#include <image.hpp>

Public Member Functions

 ImageData ()
 
 ImageData (int nw, int nh, int nbpp, int nlevels=1, int nalign=0, GLenum ncompressed=GL_FALSE)
 
 ImageData (int nw, int nh, int nbpp, uchar *data)
 
 ImageData (SDL_Surface *s)
 
 ~ImageData ()
 
void setdata (uchar *ndata, int nw, int nh, int nbpp, int nlevels=1, int nalign=0, GLenum ncompressed=GL_FALSE)
 
int calclevelsize (int level) const
 
int calcsize () const
 
void disown ()
 
void cleanup ()
 
void replace (ImageData &d)
 
void wrap (SDL_Surface *s)
 

Public Attributes

int w
 
int h
 
int bpp
 
int levels
 
int align
 
int pitch
 
GLenum compressed
 
uchardata
 
voidowner
 
void(* freefunc )(void *)
 

Detailed Description

Structure holding the Raw Pixel Data and minimum image info.

Used when loading/modifying a texture.

Constructor & Destructor Documentation

ImageData::ImageData ( )
inline

Referenced by Slot::loadlayermask().

ImageData::ImageData ( int  nw,
int  nh,
int  nbpp,
int  nlevels = 1,
int  nalign = 0,
GLenum  ncompressed = GL_FALSE 
)
inline

References setdata().

ImageData::ImageData ( int  nw,
int  nh,
int  nbpp,
uchar data 
)
inline

References setdata().

ImageData::ImageData ( SDL_Surface *  s)
inline

References wrap().

ImageData::~ImageData ( )
inline

References cleanup().

Member Function Documentation

int ImageData::calclevelsize ( int  level) const
inline

References align, bpp, h, inexor::rpc::max(), and w.

Referenced by cubemaploadwildcard(), newtexture(), and texreorient().

int ImageData::calcsize ( ) const
inline

References align, bpp, h, levels, loopi(), and w.

Referenced by loaddds(), and setdata().

void ImageData::cleanup ( )
inline

References data, disown(), freefunc, and owner.

Referenced by loaddds(), replace(), and ~ImageData().

void ImageData::disown ( )
inline

References data, freefunc, and owner.

Referenced by cleanup(), and replace().

void ImageData::replace ( ImageData d)
inline
void ImageData::setdata ( uchar ndata,
int  nw,
int  nh,
int  nbpp,
int  nlevels = 1,
int  nalign = 0,
GLenum  ncompressed = GL_FALSE 
)
inline

References align, bpp, calcsize(), compressed, data, freefunc, h, levels, owner, pitch, and w.

Referenced by ImageData(), loaddds(), and wrap().

void ImageData::wrap ( SDL_Surface *  s)
inline

References freefunc, owner, pitch, setdata(), and void().

Referenced by ImageData(), loadimage(), and texturedata().

Member Data Documentation

int ImageData::align
int ImageData::bpp
GLenum ImageData::compressed
uchar* ImageData::data
void(* ImageData::freefunc)(void *)

Referenced by cleanup(), disown(), setdata(), and wrap().

int ImageData::h
int ImageData::levels
void* ImageData::owner

Referenced by cleanup(), disown(), replace(), setdata(), and wrap().

int ImageData::pitch
int ImageData::w

The documentation for this struct was generated from the following file: