doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Enumerations | Functions | Variables
Image.h File Reference

Go to the source code of this file.

Classes

struct  ddsFilePixelFormat_t
 
struct  ddsFileHeader_t
 
class  idImage
 
class  idImageManager
 

Macros

#define DDS_MAKEFOURCC(a, b, c, d)   ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
 
#define MAX_IMAGE_NAME   256
 

Enumerations

enum  imageState_t { IS_UNLOADED, IS_PARTIAL, IS_LOADED }
 
enum  textureDepth_t {
  TD_SPECULAR, TD_DIFFUSE, TD_DEFAULT, TD_BUMP,
  TD_HIGH_QUALITY
}
 
enum  textureType_t {
  TT_DISABLED, TT_2D, TT_3D, TT_CUBIC,
  TT_RECT
}
 
enum  cubeFiles_t { CF_2D, CF_NATIVE, CF_CAMERA }
 

Functions

void R_WriteTGA (const char *filename, const byte *data, int width, int height, bool flipVertical=false)
 
void R_WritePalTGA (const char *filename, const byte *data, const byte *palette, int width, int height, bool flipVertical=false)
 
int MakePowerOfTwo (int num)
 
byteR_Dropsample (const byte *in, int inwidth, int inheight, int outwidth, int outheight)
 
byteR_ResampleTexture (const byte *in, int inwidth, int inheight, int outwidth, int outheight)
 
byteR_MipMapWithAlphaSpecularity (const byte *in, int width, int height)
 
byteR_MipMap (const byte *in, int width, int height, bool preserveBorder)
 
byteR_MipMap3D (const byte *in, int width, int height, int depth, bool preserveBorder)
 
void R_SetBorderTexels (byte *inBase, int width, int height, const byte border[4])
 
void R_SetBorderTexels3D (byte *inBase, int width, int height, int depth, const byte border[4])
 
void R_BlendOverTexture (byte *data, int pixelCount, const byte blend[4])
 
void R_HorizontalFlip (byte *data, int width, int height)
 
void R_VerticalFlip (byte *data, int width, int height)
 
void R_RotatePic (byte *data, int width)
 
void R_LoadImage (const char *name, byte **pic, int *width, int *height, ID_TIME_T *timestamp, bool makePowerOf2)
 
bool R_LoadCubeImages (const char *cname, cubeFiles_t extensions, byte *pic[6], int *size, ID_TIME_T *timestamp)
 
void R_LoadImageProgram (const char *name, byte **pic, int *width, int *height, ID_TIME_T *timestamp, textureDepth_t *depth=NULL)
 
const char * R_ParsePastImageProgram (idLexer &src)
 

Variables

const unsigned long DDSF_CAPS = 0x00000001l
 
const unsigned long DDSF_HEIGHT = 0x00000002l
 
const unsigned long DDSF_WIDTH = 0x00000004l
 
const unsigned long DDSF_PITCH = 0x00000008l
 
const unsigned long DDSF_PIXELFORMAT = 0x00001000l
 
const unsigned long DDSF_MIPMAPCOUNT = 0x00020000l
 
const unsigned long DDSF_LINEARSIZE = 0x00080000l
 
const unsigned long DDSF_DEPTH = 0x00800000l
 
const unsigned long DDSF_ALPHAPIXELS = 0x00000001l
 
const unsigned long DDSF_FOURCC = 0x00000004l
 
const unsigned long DDSF_RGB = 0x00000040l
 
const unsigned long DDSF_RGBA = 0x00000041l
 
const unsigned long DDSF_ID_INDEXCOLOR = 0x10000000l
 
const unsigned long DDSF_ID_MONOCHROME = 0x20000000l
 
const unsigned long DDSF_COMPLEX = 0x00000008l
 
const unsigned long DDSF_TEXTURE = 0x00001000l
 
const unsigned long DDSF_MIPMAP = 0x00400000l
 
idImageManagerglobalImages
 

Macro Definition Documentation

#define DDS_MAKEFOURCC (   a,
  b,
  c,
 
)    ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))

Definition at line 91 of file Image.h.

#define MAX_IMAGE_NAME   256

Definition at line 144 of file Image.h.

Enumeration Type Documentation

Enumerator
CF_2D 
CF_NATIVE 
CF_CAMERA 

Definition at line 138 of file Image.h.

Enumerator
IS_UNLOADED 
IS_PARTIAL 
IS_LOADED 

Definition at line 58 of file Image.h.

Enumerator
TD_SPECULAR 
TD_DIFFUSE 
TD_DEFAULT 
TD_BUMP 
TD_HIGH_QUALITY 

Definition at line 122 of file Image.h.

Enumerator
TT_DISABLED 
TT_2D 
TT_3D 
TT_CUBIC 
TT_RECT 

Definition at line 130 of file Image.h.

Function Documentation

int MakePowerOfTwo ( int  num)

Definition at line 46 of file Image_load.cpp.

void R_BlendOverTexture ( byte data,
int  pixelCount,
const byte  blend[4] 
)

Definition at line 554 of file Image_process.cpp.

byte* R_Dropsample ( const byte in,
int  inwidth,
int  inheight,
int  outwidth,
int  outheight 
)

Definition at line 106 of file Image_process.cpp.

void R_HorizontalFlip ( byte data,
int  width,
int  height 
)

Definition at line 579 of file Image_process.cpp.

bool R_LoadCubeImages ( const char *  cname,
cubeFiles_t  extensions,
byte pic[6],
int size,
ID_TIME_T *  timestamp 
)

Definition at line 1087 of file Image_files.cpp.

void R_LoadImage ( const char *  name,
byte **  pic,
int width,
int height,
ID_TIME_T *  timestamp,
bool  makePowerOf2 
)

Definition at line 998 of file Image_files.cpp.

void R_LoadImageProgram ( const char *  name,
byte **  pic,
int width,
int height,
ID_TIME_T *  timestamp,
textureDepth_t depth = NULL 
)

Definition at line 618 of file Image_program.cpp.

byte* R_MipMap ( const byte in,
int  width,
int  height,
bool  preserveBorder 
)

Definition at line 396 of file Image_process.cpp.

byte* R_MipMap3D ( const byte in,
int  width,
int  height,
int  depth,
bool  preserveBorder 
)

Definition at line 481 of file Image_process.cpp.

byte* R_MipMapWithAlphaSpecularity ( const byte in,
int  width,
int  height 
)

Definition at line 307 of file Image_process.cpp.

const char* R_ParsePastImageProgram ( idLexer src)

Definition at line 639 of file Image_program.cpp.

byte* R_ResampleTexture ( const byte in,
int  inwidth,
int  inheight,
int  outwidth,
int  outheight 
)

Definition at line 47 of file Image_process.cpp.

void R_RotatePic ( byte data,
int  width 
)

Definition at line 605 of file Image_process.cpp.

void R_SetBorderTexels ( byte inBase,
int  width,
int  height,
const byte  border[4] 
)

Definition at line 138 of file Image_process.cpp.

void R_SetBorderTexels3D ( byte inBase,
int  width,
int  height,
int  depth,
const byte  border[4] 
)

Definition at line 178 of file Image_process.cpp.

void R_VerticalFlip ( byte data,
int  width,
int  height 
)

Definition at line 592 of file Image_process.cpp.

void R_WritePalTGA ( const char *  filename,
const byte data,
const byte palette,
int  width,
int  height,
bool  flipVertical = false 
)

Definition at line 122 of file Image_files.cpp.

void R_WriteTGA ( const char *  filename,
const byte data,
int  width,
int  height,
bool  flipVertical = false 
)

Definition at line 85 of file Image_files.cpp.

Variable Documentation

const unsigned long DDSF_ALPHAPIXELS = 0x00000001l

Definition at line 77 of file Image.h.

const unsigned long DDSF_CAPS = 0x00000001l

Definition at line 67 of file Image.h.

const unsigned long DDSF_COMPLEX = 0x00000008l

Definition at line 87 of file Image.h.

const unsigned long DDSF_DEPTH = 0x00800000l

Definition at line 74 of file Image.h.

const unsigned long DDSF_FOURCC = 0x00000004l

Definition at line 78 of file Image.h.

const unsigned long DDSF_HEIGHT = 0x00000002l

Definition at line 68 of file Image.h.

const unsigned long DDSF_ID_INDEXCOLOR = 0x10000000l

Definition at line 83 of file Image.h.

const unsigned long DDSF_ID_MONOCHROME = 0x20000000l

Definition at line 84 of file Image.h.

const unsigned long DDSF_LINEARSIZE = 0x00080000l

Definition at line 73 of file Image.h.

const unsigned long DDSF_MIPMAP = 0x00400000l

Definition at line 89 of file Image.h.

const unsigned long DDSF_MIPMAPCOUNT = 0x00020000l

Definition at line 72 of file Image.h.

const unsigned long DDSF_PITCH = 0x00000008l

Definition at line 70 of file Image.h.

const unsigned long DDSF_PIXELFORMAT = 0x00001000l

Definition at line 71 of file Image.h.

const unsigned long DDSF_RGB = 0x00000040l

Definition at line 79 of file Image.h.

const unsigned long DDSF_RGBA = 0x00000041l

Definition at line 80 of file Image.h.

const unsigned long DDSF_TEXTURE = 0x00001000l

Definition at line 88 of file Image.h.

const unsigned long DDSF_WIDTH = 0x00000004l

Definition at line 69 of file Image.h.

idImageManager* globalImages

Definition at line 74 of file Image_init.cpp.