diff options
Diffstat (limited to 'src/renderergl1/tr_local.h')
-rw-r--r-- | src/renderergl1/tr_local.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/src/renderergl1/tr_local.h b/src/renderergl1/tr_local.h index 40e78500..597b89a7 100644 --- a/src/renderergl1/tr_local.h +++ b/src/renderergl1/tr_local.h @@ -81,6 +81,27 @@ typedef struct { float modelMatrix[16]; } orientationr_t; +typedef enum +{ + IMGTYPE_COLORALPHA, // for color, lightmap, diffuse, and specular + IMGTYPE_NORMAL, + IMGTYPE_NORMALHEIGHT, + IMGTYPE_DELUXE, // normals are swizzled, deluxe are not +} imgType_t; + +typedef enum +{ + IMGFLAG_NONE = 0x0000, + IMGFLAG_MIPMAP = 0x0001, + IMGFLAG_PICMIP = 0x0002, + IMGFLAG_CUBEMAP = 0x0004, + IMGFLAG_NO_COMPRESSION = 0x0010, + IMGFLAG_NOLIGHTSCALE = 0x0020, + IMGFLAG_CLAMPTOEDGE = 0x0040, + IMGFLAG_SRGB = 0x0080, + IMGFLAG_GENNORMALMAP = 0x0100, +} imgFlags_t; + typedef struct image_s { char imgName[MAX_QPATH]; // game path, including extension int width, height; // source image @@ -92,9 +113,8 @@ typedef struct image_s { int internalFormat; int TMU; // only needed for voodoo2 - qboolean mipmap; - qboolean allowPicmip; - int wrapClampMode; // GL_CLAMP_TO_EDGE or GL_REPEAT + imgType_t type; + imgFlags_t flags; struct image_s* next; } image_t; @@ -1200,10 +1220,10 @@ qboolean R_GetEntityToken( char *buffer, int size ); model_t *R_AllocModel( void ); void R_Init( void ); -image_t *R_FindImageFile( const char *name, qboolean mipmap, qboolean allowPicmip, int glWrapClampMode ); +image_t *R_FindImageFile( const char *name, imgType_t type, imgFlags_t flags ); -image_t *R_CreateImage( const char *name, const byte *pic, int width, int height, qboolean mipmap, - qboolean allowPicmip, int wrapClampMode ); +image_t *R_CreateImage( const char *name, byte *pic, int width, int height, + imgType_t type, imgFlags_t flags, int internalFormat ); void R_SetColorMappings( void ); void R_GammaCorrect( byte *buffer, int bufSize ); |