diff options
author | Tim Angus <tim@ngus.net> | 2013-03-12 19:41:52 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-03-19 16:41:19 +0000 |
commit | 3c3fdd5e958a439fcbe2513349b21f4ed3e9a32b (patch) | |
tree | a4a5c58ae7ceace7d76379f92bc9e0a5de5965ff /src | |
parent | 0241b91ba55583d9fcc8d0699da33078d6427264 (diff) |
Fix USE_FREETYPE breakage
Diffstat (limited to 'src')
-rw-r--r-- | src/renderercommon/tr_common.h | 58 | ||||
-rw-r--r-- | src/renderergl1/tr_local.h | 60 | ||||
-rw-r--r-- | src/renderergl2/tr_local.h | 53 |
3 files changed, 58 insertions, 113 deletions
diff --git a/src/renderercommon/tr_common.h b/src/renderercommon/tr_common.h index 5c0e4dd5..fe44f784 100644 --- a/src/renderercommon/tr_common.h +++ b/src/renderercommon/tr_common.h @@ -27,6 +27,51 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../renderercommon/tr_public.h" #include "qgl.h" +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 + int uploadWidth, uploadHeight; // after power of two and picmip but not including clamp to MAX_TEXTURE_SIZE + GLuint texnum; // gl texture binding + + int frameUsed; // for texture usage in frame statistics + + int internalFormat; + int TMU; // only needed for voodoo2 + + imgType_t type; + imgFlags_t flags; + + struct image_s* next; +} image_t; + +// any change in the LIGHTMAP_* defines here MUST be reflected in +// R_FindShader() in tr_bsp.c +#define LIGHTMAP_2D -4 // shader is for 2D rendering +#define LIGHTMAP_BY_VERTEX -3 // pre-lit triangle models +#define LIGHTMAP_WHITEIMAGE -2 +#define LIGHTMAP_NONE -1 + extern refimport_t ri; extern glconfig_t glConfig; // outside of TR since it shouldn't be cleared during ref re-init @@ -63,13 +108,26 @@ extern cvar_t *r_ext_max_anisotropy; extern cvar_t *r_stereoEnabled; +extern cvar_t *r_saveFontData; + qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode ); float R_NoiseGet4f( float x, float y, float z, float t ); void R_NoiseInit( void ); +image_t *R_FindImageFile( const char *name, imgType_t type, imgFlags_t flags ); +image_t *R_CreateImage( const char *name, byte *pic, int width, int height, imgType_t type, imgFlags_t flags, int internalFormat ); + void R_IssuePendingRenderCommands( void ); +qhandle_t RE_RegisterShaderLightMap( const char *name, int lightmapIndex ); +qhandle_t RE_RegisterShader( const char *name ); qhandle_t RE_RegisterShaderNoMip( const char *name ); +qhandle_t RE_RegisterShaderFromImage(const char *name, int lightmapIndex, image_t *image, qboolean mipRawImage); + +// font stuff +void R_InitFreeType( void ); +void R_DoneFreeType( void ); +void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font); /* ==================================================================== diff --git a/src/renderergl1/tr_local.h b/src/renderergl1/tr_local.h index 597b89a7..14dfa6d5 100644 --- a/src/renderergl1/tr_local.h +++ b/src/renderergl1/tr_local.h @@ -81,44 +81,6 @@ 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 - int uploadWidth, uploadHeight; // after power of two and picmip but not including clamp to MAX_TEXTURE_SIZE - GLuint texnum; // gl texture binding - - int frameUsed; // for texture usage in frame statistics - - int internalFormat; - int TMU; // only needed for voodoo2 - - imgType_t type; - imgFlags_t flags; - - struct image_s* next; -} image_t; - //=============================================================================== typedef enum { @@ -333,13 +295,6 @@ typedef struct { struct shaderCommands_s; -// any change in the LIGHTMAP_* defines here MUST be reflected in -// R_FindShader() in tr_bsp.c -#define LIGHTMAP_2D -4 // shader is for 2D rendering -#define LIGHTMAP_BY_VERTEX -3 // pre-lit triangle models -#define LIGHTMAP_WHITEIMAGE -2 -#define LIGHTMAP_NONE -1 - typedef enum { CT_FRONT_SIDED, CT_BACK_SIDED, @@ -1121,7 +1076,6 @@ extern cvar_t *r_showImages; extern cvar_t *r_debugSort; extern cvar_t *r_printShaders; -extern cvar_t *r_saveFontData; extern cvar_t *r_marksOnTriangleMeshes; @@ -1220,10 +1174,6 @@ qboolean R_GetEntityToken( char *buffer, int size ); model_t *R_AllocModel( void ); void R_Init( void ); -image_t *R_FindImageFile( const char *name, imgType_t type, imgFlags_t flags ); - -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 ); @@ -1249,11 +1199,6 @@ const void *RB_TakeVideoFrameCmd( const void *data ); // // tr_shader.c // -qhandle_t RE_RegisterShaderLightMap( const char *name, int lightmapIndex ); -qhandle_t RE_RegisterShader( const char *name ); -qhandle_t RE_RegisterShaderNoMip( const char *name ); -qhandle_t RE_RegisterShaderFromImage(const char *name, int lightmapIndex, image_t *image, qboolean mipRawImage); - shader_t *R_FindShader( const char *name, int lightmapIndex, qboolean mipRawImage ); shader_t *R_GetShaderByHandle( qhandle_t hShader ); shader_t *R_GetShaderByState( int index, long *cycleTime ); @@ -1682,10 +1627,5 @@ size_t RE_SaveJPGToBuffer(byte *buffer, size_t bufSize, int quality, void RE_TakeVideoFrame( int width, int height, byte *captureBuffer, byte *encodeBuffer, qboolean motionJpeg ); -// font stuff -void R_InitFreeType( void ); -void R_DoneFreeType( void ); -void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font); - #endif //TR_LOCAL_H diff --git a/src/renderergl2/tr_local.h b/src/renderergl2/tr_local.h index 8372755b..b5873107 100644 --- a/src/renderergl2/tr_local.h +++ b/src/renderergl2/tr_local.h @@ -100,44 +100,6 @@ typedef struct { 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 - int uploadWidth, uploadHeight; // after power of two and picmip but not including clamp to MAX_TEXTURE_SIZE - GLuint texnum; // gl texture binding - - int frameUsed; // for texture usage in frame statistics - - int internalFormat; - int TMU; // only needed for voodoo2 - - imgType_t type; - imgFlags_t flags; - - struct image_s* next; -} image_t; - -typedef enum -{ VBO_USAGE_STATIC, VBO_USAGE_DYNAMIC } vboUsage_t; @@ -448,13 +410,6 @@ typedef struct { struct shaderCommands_s; -// any change in the LIGHTMAP_* defines here MUST be reflected in -// R_FindShader() in tr_bsp.c -#define LIGHTMAP_2D -4 // shader is for 2D rendering -#define LIGHTMAP_BY_VERTEX -3 // pre-lit triangle models -#define LIGHTMAP_WHITEIMAGE -2 -#define LIGHTMAP_NONE -1 - typedef enum { CT_FRONT_SIDED, CT_BACK_SIDED, @@ -2103,7 +2058,6 @@ extern cvar_t *r_showImages; extern cvar_t *r_debugSort; extern cvar_t *r_printShaders; -extern cvar_t *r_saveFontData; extern cvar_t *r_marksOnTriangleMeshes; @@ -2220,8 +2174,6 @@ qboolean R_GetEntityToken( char *buffer, int size ); model_t *R_AllocModel( void ); void R_Init( void ); -image_t *R_FindImageFile( const char *name, imgType_t type, imgFlags_t flags ); -image_t *R_CreateImage( const char *name, byte *pic, int width, int height, imgType_t type, imgFlags_t flags, int internalFormat ); void R_UpdateSubImage( image_t *image, byte *pic, int x, int y, int width, int height ); void R_SetColorMappings( void ); @@ -2248,11 +2200,6 @@ const void *RB_TakeVideoFrameCmd( const void *data ); // // tr_shader.c // -qhandle_t RE_RegisterShaderLightMap( const char *name, int lightmapIndex ); -qhandle_t RE_RegisterShader( const char *name ); -qhandle_t RE_RegisterShaderNoMip( const char *name ); -qhandle_t RE_RegisterShaderFromImage(const char *name, int lightmapIndex, image_t *image, qboolean mipRawImage); - shader_t *R_FindShader( const char *name, int lightmapIndex, qboolean mipRawImage ); shader_t *R_GetShaderByHandle( qhandle_t hShader ); shader_t *R_GetShaderByState( int index, long *cycleTime ); |