64 static const int MAX_TEXTURE_LEVELS = 14;
91 #define DDS_MAKEFOURCC(a, b, c, d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
113 unsigned long dwReserved1[11];
117 unsigned long dwReserved2[3];
144 #define MAX_IMAGE_NAME 256
176 void CopyFramebuffer(
int x,
int y,
int width,
int height,
bool useOversizedBuffer );
192 void Reload(
bool checkPrecompressed,
bool force );
198 void GetDownsize(
int &scaled_width,
int &scaled_height )
const;
459 int outwidth,
int outheight );
461 int outwidth,
int outheight );
idImage * specular2DTableImage
const unsigned long DDSF_ALPHAPIXELS
bool ShouldImageBePartialCached()
byte * R_Dropsample(const byte *in, int inwidth, int inheight, int outwidth, int outheight)
static idCVar image_anisotropy
const unsigned long DDSF_LINEARSIZE
static idCVar image_preload
void GenerateImage(const byte *pic, int width, int height, textureFilter_t filter, bool allowDownSize, textureRepeat_t repeat, textureDepth_t depth)
static idCVar image_useCompression
void GetDownsize(int &scaled_width, int &scaled_height) const
int numActiveBackgroundImageLoads
const unsigned long DDSF_RGB
GLenum SelectInternalFormat(const byte **dataPtrs, int numDataPtrs, int width, int height, textureDepth_t minimumDepth, bool *monochromeResult) const
static idCVar image_downSizeBump
void R_LoadImage(const char *name, byte **pic, int *width, int *height, ID_TIME_T *timestamp, bool makePowerOf2)
idImage * GetImage(const char *name) const
const unsigned long DDSF_PITCH
byte * R_MipMapWithAlphaSpecularity(const byte *in, int width, int height)
byte * R_MipMap(const byte *in, int width, int height, bool preserveBorder)
GLenum GLsizei GLenum GLenum const GLvoid * image
GLint GLint GLsizei GLsizei GLsizei depth
idImage * currentRenderImage
const unsigned long DDSF_MIPMAP
const unsigned long DDSF_CAPS
void Generate3DImage(const byte *pic, int width, int height, int depth, textureFilter_t filter, bool allowDownSize, textureRepeat_t repeat, textureDepth_t minDepth)
GLuint GLuint GLsizei GLenum type
void FinishBuild(bool removeDups=false)
void PrintMemInfo(MemInfo_t *mi)
void SetClassification(int tag)
void CompleteBackgroundImageLoads()
void R_LoadImageProgram(const char *name, byte **pic, int *width, int *height, ID_TIME_T *timestamp, textureDepth_t *depth=NULL)
byte * R_MipMap3D(const byte *in, int width, int height, int depth, bool preserveBorder)
void CopyFramebuffer(int x, int y, int width, int height, bool useOversizedBuffer)
bool backgroundLoadInProgress
idImage * alphaNotchImage
void R_BlendOverTexture(byte *data, int pixelCount, const byte blend[4])
idImage * ambientNormalMap
void GenerateCubeImage(const byte *pic[6], int size, textureFilter_t filter, bool allowDownSize, textureDepth_t depth)
const char * R_ParsePastImageProgram(idLexer &src)
void ChangeTextureFilter()
const unsigned long DDSF_HEIGHT
static idCVar image_forceDownSize
idImage * backgroundImageLoads
const unsigned long DDSF_FOURCC
idImage * normalCubeMapImage
idImage * AllocImage(const char *name)
const unsigned long DDSF_MIPMAPCOUNT
const unsigned long DDSF_WIDTH
void UploadScratch(const byte *pic, int width, int height)
bool referencedOutsideLevelLoad
void ActuallyLoadImage(bool checkForPrecompressed, bool fromBackEnd)
void R_WritePalTGA(const char *filename, const byte *data, const byte *palette, int width, int height, bool flipVertical=false)
byte * R_ResampleTexture(const byte *in, int inwidth, int inheight, int outwidth, int outheight)
static idCVar image_downSizeBumpLimit
static idCVar image_usePrecompressedTextures
GLsizei GLsizei GLenum GLenum const GLvoid * data
void UploadCompressedNormalMap(int width, int height, const byte *rgba, int mipLevel)
const unsigned long DDSF_ID_MONOCHROME
idImageManager * globalImages
void R_HorizontalFlip(byte *data, int width, int height)
const unsigned long DDSF_RGBA
void StartBackgroundImageLoad()
static idCVar image_useNormalCompression
void R_WriteTGA(const char *filename, const byte *data, int width, int height, bool flipVertical=false)
void SetImageFilterAndRepeat() const
idImage * borderClampImage
static idCVar image_writeTGA
idImage * imageHashTable[FILE_HASH_SIZE]
idImage * ImageFromFunction(const char *name, void(*generatorFunction)(idImage *image))
idImage * scratchCubeMapImage
static idCVar image_downSizeSpecular
static idCVar image_writeNormalTGA
static idCVar image_downSize
const unsigned long DDSF_DEPTH
byte originalToCompressed[256]
GLenum GLsizei GLsizei height
static idCVar image_downSizeLimit
static idCVar image_lodbias
const unsigned long DDSF_TEXTURE
static idCVar image_roundDown
void R_SetBorderTexels(byte *inBase, int width, int height, const byte border[4])
void R_RotatePic(byte *data, int width)
void ImageProgramStringToCompressedFileName(const char *imageProg, char *fileName) const
idImage * ImageFromFile(const char *name, textureFilter_t filter, bool allowDownSize, textureRepeat_t repeat, textureDepth_t depth, cubeFiles_t cubeMap=CF_2D)
void UploadPrecompressedImage(byte *data, int len)
static idCVar image_cacheMinK
void(* generatorFunction)(idImage *image)
GLint GLint GLsizei GLsizei GLsizei GLint border
void R_SetBorderTexels3D(byte *inBase, int width, int height, int depth, const byte border[4])
const unsigned long DDSF_ID_INDEXCOLOR
idList< idImage * > images
static idCVar image_writeNormalTGAPalletized
void R_VerticalFlip(byte *data, int width, int height)
static idCVar image_filter
static idCVar image_cacheMegs
static idCVar image_useAllFormats
static idCVar image_ignoreHighQuality
static idCVar image_showBackgroundLoads
void Reload(bool checkPrecompressed, bool force)
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
static const int TEXTURE_NOT_LOADED
void AddDDSCommand(const char *cmd)
static idCVar image_useCache
static const int MAX_BACKGROUND_IMAGE_LOADS
int BitsForInternalFormat(int internalFormat) const
idImage * specularTableImage
typedef GLuint(APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC)(GLsizei range)
bool CheckPrecompressedImage(bool fullLoad)
int MakePowerOfTwo(int num)
int NumLevelsForImageSize(int width, int height) const
void WritePrecompressedImage()
void CopyDepthbuffer(int x, int y, int width, int height)
bool R_LoadCubeImages(const char *cname, cubeFiles_t extensions, byte *pic[6], int *size, ID_TIME_T *timestamp)
static idCVar image_useOffLineCompression
static idCVar image_colorMipLevels
static idCVar image_writePrecompressedTextures
const unsigned long DDSF_COMPLEX
static idCVar image_downSizeSpecularLimit
const unsigned long DDSF_PIXELFORMAT
byte compressedPalette[768]