![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
Go to the source code of this file.
Data Structures | |
struct | glmode_t |
struct | gltexture_t |
struct | gltexturepool_t |
struct | textypeinfo_t |
Macros | |
#define | GLTEXF_DYNAMIC 0x00080000 |
#define | GLTEXF_IMPORTANTBITS (0) |
#define | TEXTUREPOOL_SENTINEL 0xC0DEDBAD |
Enumerations | |
enum | gltexturetype_t { GLTEXTURETYPE_2D , GLTEXTURETYPE_3D , GLTEXTURETYPE_CUBEMAP , GLTEXTURETYPE_TOTAL } |
Variables | |
static unsigned char * | colorconvertbuffer |
static int | cubemapside [6] |
qbool | gl_filter_force = false |
int | gl_filter_mag = GL_LINEAR |
int | gl_filter_min = GL_LINEAR_MIPMAP_LINEAR |
cvar_t | gl_max_lightmapsize = {CF_CLIENT | CF_ARCHIVE, "gl_max_lightmapsize", "512", "maximum allowed texture size for lightmap textures, use larger values to improve rendering speed, as long as there is enough video memory available (setting it too high for the hardware will cause very bad performance)"} |
cvar_t | gl_max_size = {CF_CLIENT | CF_ARCHIVE, "gl_max_size", "2048", "maximum allowed texture size, can be used to reduce video memory usage, limited by hardware capabilities (typically 2048, 4096, or 8192)"} |
cvar_t | gl_picmip = {CF_CLIENT | CF_ARCHIVE, "gl_picmip", "0", "reduces resolution of textures by powers of 2, for example 1 will halve width/height, reducing texture memory usage by 75%"} |
cvar_t | gl_picmip_other = {CF_CLIENT | CF_ARCHIVE, "gl_picmip_other", "0", "extra picmip level for other textures (may be negative, which will then reduce gl_picmip for these)"} |
cvar_t | gl_picmip_sprites = {CF_CLIENT | CF_ARCHIVE, "gl_picmip_sprites", "0", "extra picmip level for sprite textures (may be negative, which will then reduce gl_picmip for these)"} |
cvar_t | gl_picmip_world = {CF_CLIENT | CF_ARCHIVE, "gl_picmip_world", "0", "extra picmip level for world textures (may be negative, which will then reduce gl_picmip for these)"} |
cvar_t | gl_texture_anisotropy = {CF_CLIENT | CF_ARCHIVE, "gl_texture_anisotropy", "1", "anisotropic filtering quality (if supported by hardware), 1 sample (no anisotropy) and 8 sample (8 tap anisotropy) are recommended values"} |
cvar_t | gl_texturecompression = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression", "0", "whether to compress textures, a value of 0 disables compression (even if the individual cvars are 1), 1 enables fast (low quality) compression at startup, 2 enables slow (high quality) compression at startup"} |
cvar_t | gl_texturecompression_2d = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_2d", "0", "whether to compress 2d (hud/menu) textures other than the font"} |
cvar_t | gl_texturecompression_color = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_color", "1", "whether to compress colormap (diffuse) textures"} |
cvar_t | gl_texturecompression_gloss = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_gloss", "1", "whether to compress glossmap (specular) textures"} |
cvar_t | gl_texturecompression_glow = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_glow", "1", "whether to compress glowmap (luma) textures"} |
cvar_t | gl_texturecompression_lightcubemaps = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_lightcubemaps", "1", "whether to compress light cubemaps (spotlights and other light projection images)"} |
cvar_t | gl_texturecompression_normal = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_normal", "0", "whether to compress normalmap (normalmap) textures"} |
cvar_t | gl_texturecompression_q3bspdeluxemaps = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_q3bspdeluxemaps", "0", "whether to compress deluxemaps in q3bsp format levels (only levels compiled with q3map2 -deluxe have these)"} |
cvar_t | gl_texturecompression_q3bsplightmaps = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_q3bsplightmaps", "0", "whether to compress lightmaps in q3bsp format levels"} |
cvar_t | gl_texturecompression_reflectmask = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_reflectmask", "1", "whether to compress reflection cubemap masks (mask of which areas of the texture should reflect the generic shiny cubemap)"} |
cvar_t | gl_texturecompression_sky = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_sky", "0", "whether to compress sky textures"} |
cvar_t | gl_texturecompression_sprites = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_sprites", "1", "whether to compress sprites"} |
static gltexturepool_t * | gltexturepoolchain = NULL |
static int | gltexturetypedimensions [GLTEXTURETYPE_TOTAL] = {2, 3, 2} |
static int | gltexturetypeenums [GLTEXTURETYPE_TOTAL] = {GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_CUBE_MAP} |
static glmode_t | modes [6] |
cvar_t | r_lerpimages = {CF_CLIENT | CF_ARCHIVE, "r_lerpimages", "1", "bilinear filters images when scaling them up to power of 2 size (mode 1), looks better than glquake (mode 0)"} |
cvar_t | r_picmipsprites = {CF_CLIENT | CF_ARCHIVE, "r_picmipsprites", "1", "make gl_picmip affect sprites too (saves some graphics memory in sprite heavy games) (setting this to 0 is a shorthand for gl_picmip_sprites -9999999)"} |
cvar_t | r_picmipworld = {CF_CLIENT | CF_ARCHIVE, "r_picmipworld", "1", "whether gl_picmip shall apply to world textures too (setting this to 0 is a shorthand for gl_picmip_world -9999999)"} |
cvar_t | r_texture_dds_load_alphamode = {CF_CLIENT, "r_texture_dds_load_alphamode", "1", "0: trust DDPF_ALPHAPIXELS flag, 1: texture format and brute force search if ambiguous, 2: texture format only"} |
cvar_t | r_texture_dds_load_logfailure = {CF_CLIENT, "r_texture_dds_load_logfailure", "0", "log missing DDS textures to ddstexturefailures.log, 0: done log, 1: log with no optional textures (_norm, glow etc.). 2: log all"} |
cvar_t | r_texture_dds_swdecode = {CF_CLIENT, "r_texture_dds_swdecode", "0", "0: don't software decode DDS, 1: software decode DDS if unsupported, 2: always software decode DDS"} |
static unsigned char * | resizebuffer = NULL |
static int | resizebuffersize = 0 |
static memexpandablearray_t | texturearray |
static const unsigned char * | texturebuffer |
static mempool_t * | texturemempool |
static textypeinfo_t | textype_alpha = {"alpha", TEXTYPE_ALPHA , 1, 4, 4.0f, GL_ALPHA , GL_ALPHA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_bgra = {"bgra", TEXTYPE_BGRA , 4, 4, 4.0f, GL_RGB , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_bgra_alpha = {"bgra_alpha", TEXTYPE_BGRA , 4, 4, 4.0f, GL_RGBA , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_bgra_alpha_compress = {"bgra_alpha_compress", TEXTYPE_BGRA , 4, 4, 1.0f, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_bgra_compress = {"bgra_compress", TEXTYPE_BGRA , 4, 4, 0.5f, GL_COMPRESSED_RGB_S3TC_DXT1_EXT , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_colorbuffer = {"colorbuffer", TEXTYPE_COLORBUFFER , 4, 4, 4.0f, GL_RGBA , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_colorbuffer16f = {"colorbuffer16f", TEXTYPE_COLORBUFFER16F , 8, 8, 8.0f, GL_RGBA16F , GL_RGBA , GL_HALF_FLOAT } |
static textypeinfo_t | textype_colorbuffer32f = {"colorbuffer32f", TEXTYPE_COLORBUFFER32F , 16, 16, 16.0f, GL_RGBA32F , GL_RGBA , GL_FLOAT } |
static textypeinfo_t | textype_depth16 = {"depth16", TEXTYPE_DEPTHBUFFER16 , 2, 2, 2.0f, GL_DEPTH_COMPONENT16 , GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT} |
static textypeinfo_t | textype_depth24 = {"depth24", TEXTYPE_DEPTHBUFFER24 , 4, 4, 4.0f, GL_DEPTH_COMPONENT24 , GL_DEPTH_COMPONENT, GL_UNSIGNED_INT } |
static textypeinfo_t | textype_depth24stencil8 = {"depth24stencil8", TEXTYPE_DEPTHBUFFER24STENCIL8, 4, 4, 4.0f, GL_DEPTH24_STENCIL8 , GL_DEPTH_STENCIL , GL_UNSIGNED_INT_24_8} |
static textypeinfo_t | textype_dxt1 = {"dxt1", TEXTYPE_DXT1 , 4, 0, 0.5f, GL_COMPRESSED_RGB_S3TC_DXT1_EXT , 0 , 0 } |
static textypeinfo_t | textype_dxt1a = {"dxt1a", TEXTYPE_DXT1A , 4, 0, 0.5f, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT , 0 , 0 } |
static textypeinfo_t | textype_dxt3 = {"dxt3", TEXTYPE_DXT3 , 4, 0, 1.0f, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT , 0 , 0 } |
static textypeinfo_t | textype_dxt5 = {"dxt5", TEXTYPE_DXT5 , 4, 0, 1.0f, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT , 0 , 0 } |
static textypeinfo_t | textype_palette = {"palette", TEXTYPE_PALETTE , 1, 4, 4.0f, GL_RGB , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_palette_alpha = {"palette_alpha", TEXTYPE_PALETTE , 1, 4, 4.0f, GL_RGBA , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_rgba = {"rgba", TEXTYPE_RGBA , 4, 4, 4.0f, GL_RGB , GL_RGBA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_rgba_alpha = {"rgba_alpha", TEXTYPE_RGBA , 4, 4, 4.0f, GL_RGBA , GL_RGBA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_rgba_alpha_compress = {"rgba_alpha_compress", TEXTYPE_RGBA , 4, 4, 1.0f, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT , GL_RGBA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_rgba_compress = {"rgba_compress", TEXTYPE_RGBA , 4, 4, 0.5f, GL_COMPRESSED_RGB_S3TC_DXT1_EXT , GL_RGBA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_shadowmap16_comp = {"shadowmap16_comp", TEXTYPE_SHADOWMAP16_COMP , 2, 2, 2.0f, GL_DEPTH_COMPONENT16 , GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT} |
static textypeinfo_t | textype_shadowmap16_raw = {"shadowmap16_raw", TEXTYPE_SHADOWMAP16_RAW , 2, 2, 2.0f, GL_DEPTH_COMPONENT16 , GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT} |
static textypeinfo_t | textype_shadowmap24_comp = {"shadowmap24_comp", TEXTYPE_SHADOWMAP24_COMP , 4, 4, 4.0f, GL_DEPTH_COMPONENT24 , GL_DEPTH_COMPONENT, GL_UNSIGNED_INT } |
static textypeinfo_t | textype_shadowmap24_raw = {"shadowmap24_raw", TEXTYPE_SHADOWMAP24_RAW , 4, 4, 4.0f, GL_DEPTH_COMPONENT24 , GL_DEPTH_COMPONENT, GL_UNSIGNED_INT } |
static textypeinfo_t | textype_sRGB_bgra = {"sRGB_bgra", TEXTYPE_BGRA , 4, 4, 4.0f, GL_SRGB , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_sRGB_bgra_alpha = {"sRGB_bgra_alpha", TEXTYPE_BGRA , 4, 4, 4.0f, GL_SRGB_ALPHA , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_sRGB_bgra_alpha_compress = {"sRGB_bgra_alpha_compress", TEXTYPE_BGRA , 4, 4, 1.0f, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_sRGB_bgra_compress = {"sRGB_bgra_compress", TEXTYPE_BGRA , 4, 4, 0.5f, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_sRGB_dxt1 = {"sRGB_dxt1", TEXTYPE_DXT1 , 4, 0, 0.5f, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT , 0 , 0 } |
static textypeinfo_t | textype_sRGB_dxt1a = {"sRGB_dxt1a", TEXTYPE_DXT1A , 4, 0, 0.5f, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, 0 , 0 } |
static textypeinfo_t | textype_sRGB_dxt3 = {"sRGB_dxt3", TEXTYPE_DXT3 , 4, 0, 1.0f, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, 0 , 0 } |
static textypeinfo_t | textype_sRGB_dxt5 = {"sRGB_dxt5", TEXTYPE_DXT5 , 4, 0, 1.0f, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, 0 , 0 } |
static textypeinfo_t | textype_sRGB_palette = {"sRGB_palette", TEXTYPE_PALETTE , 1, 4, 4.0f, GL_SRGB , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_sRGB_palette_alpha = {"sRGB_palette_alpha", TEXTYPE_PALETTE , 1, 4, 4.0f, GL_SRGB_ALPHA , GL_BGRA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_sRGB_rgba = {"sRGB_rgba", TEXTYPE_RGBA , 4, 4, 4.0f, GL_SRGB , GL_RGBA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_sRGB_rgba_alpha = {"sRGB_rgba_alpha", TEXTYPE_RGBA , 4, 4, 4.0f, GL_SRGB_ALPHA , GL_RGBA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_sRGB_rgba_alpha_compress = {"sRGB_rgba_alpha_compress", TEXTYPE_RGBA , 4, 4, 1.0f, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, GL_RGBA , GL_UNSIGNED_BYTE } |
static textypeinfo_t | textype_sRGB_rgba_compress = {"sRGB_rgba_compress", TEXTYPE_RGBA , 4, 4, 0.5f, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT , GL_RGBA , GL_UNSIGNED_BYTE } |
#define GLTEXF_DYNAMIC 0x00080000 |
Definition at line 65 of file gl_textures.c.
Referenced by R_MakeTextureDynamic(), R_MarkDirtyTexture(), and R_RealGetTexture().
#define GLTEXF_IMPORTANTBITS (0) |
Definition at line 63 of file gl_textures.c.
#define TEXTUREPOOL_SENTINEL 0xC0DEDBAD |
Definition at line 239 of file gl_textures.c.
Referenced by R_AllocTexturePool(), and R_FreeTexturePool().
enum gltexturetype_t |
Enumerator | |
---|---|
GLTEXTURETYPE_2D | |
GLTEXTURETYPE_3D | |
GLTEXTURETYPE_CUBEMAP | |
GLTEXTURETYPE_TOTAL |
Definition at line 155 of file gl_textures.c.
Definition at line 837 of file gl_textures.c.
References bound, CHECKGLERROR, Cvar_SetValueQuick(), viddef_support_t::ext_texture_filter_anisotropic, flags, GL_CLAMP_TO_EDGE, GL_COMPARE_R_TO_TEXTURE, gl_filter_force, gl_filter_mag, gl_filter_min, GL_LEQUAL, GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_NEAREST, GL_NEAREST_MIPMAP_LINEAR, GL_NEAREST_MIPMAP_NEAREST, GL_NONE, GL_REPEAT, gl_texture_anisotropy, GL_TEXTURE_COMPARE_FUNC, GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MAX_ANISOTROPY_EXT, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_R, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, gltexturetypedimensions, gltexturetypeenums, cvar_t::integer, viddef_t::max_anisotropy, viddef_t::support, TEXF_CLAMP, TEXF_FORCELINEAR, TEXF_FORCENEAREST, TEXF_MIPMAP, TEXTYPE_SHADOWMAP16_COMP, TEXTYPE_SHADOWMAP16_RAW, TEXTYPE_SHADOWMAP24_COMP, TEXTYPE_SHADOWMAP24_RAW, and vid.
Referenced by R_LoadTextureDDSFile(), and R_UploadFullTexture().
|
static |
Definition at line 511 of file gl_textures.c.
References bound, flags, gl_max_size, GLTEXTURETYPE_2D, GLTEXTURETYPE_3D, GLTEXTURETYPE_CUBEMAP, cvar_t::integer, max, viddef_t::maxtexturesize_2d, viddef_t::maxtexturesize_3d, viddef_t::maxtexturesize_cubemap, min, TEXF_MIPMAP, TEXF_PICMIP, and vid.
Referenced by R_CalcTexelDataSize(), R_LoadTextureRenderBuffer(), and R_SetupTexture().
|
static |
Definition at line 442 of file gl_textures.c.
References gltexture_t::chain, CHECKGLERROR, cmd(), Cmd_Argc(), Cmd_Argv(), Con_Print(), Con_Printf(), gltexture_t::flags, GL_ActiveTexture(), gl_filter_force, gl_filter_mag, gl_filter_min, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, gltexturepool_t::gltchain, gltexturepoolchain, gltexturetypeenums, i, int(), glmode_t::magnification, glmode_t::minification, modes, name, gltexturepool_t::next, R_Mesh_TexBound(), viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, TEXF_FORCELINEAR, TEXF_FORCENEAREST, TEXF_MIPMAP, gltexture_t::texnum, gltexture_t::texturetype, and vid.
Referenced by R_Textures_Init().
rtexturepool_t * R_AllocTexturePool | ( | void | ) |
Definition at line 389 of file gl_textures.c.
References gltexturepoolchain, Mem_Alloc, gltexturepool_t::next, NULL, gltexturepool_t::sentinel, texturemempool, and TEXTUREPOOL_SENTINEL.
Referenced by cl_video_start(), gl_draw_start(), gl_main_start(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_Mesh_Create(), Mod_Q1BSP_LoadFaces(), Mod_Q1BSP_LoadSplitSky(), Mod_Q3BSP_Load(), Mod_VBSP_Load(), Mod_VBSP_LoadFaces(), r_explosion_start(), r_part_start(), R_Shadow_MakeTextures(), and r_sky_start().
|
static |
Definition at line 557 of file gl_textures.c.
References gltexture_t::flags, GL_Texture_CalcImageSize(), textypeinfo_t::glinternalbytesperpixel, gltexture_t::inputdepth, gltexture_t::inputheight, gltexture_t::inputwidth, gltexture_t::miplevel, NULL, gltexture_t::sides, size, TEXF_MIPMAP, gltexture_t::texturetype, and gltexture_t::textype.
Referenced by R_TextureStats_Print().
void R_ClearTexture | ( | rtexture_t * | rt | ) |
Definition at line 2387 of file gl_textures.c.
References NULL, and R_UploadFullTexture().
void R_FreeTexture | ( | rtexture_t * | rt | ) |
Definition at line 351 of file gl_textures.c.
References gltexture_t::chain, CHECKGLERROR, Host_Error(), gltexture_t::identifier, gltexture_t::inputtexels, Mem_ExpandableArray_FreeRecord(), Mem_Free, NULL, gltexture_t::pool, R_Mesh_ClearBindingsForTexture(), gltexture_t::renderbuffernum, viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, gltexture_t::texnum, texturearray, and vid.
Referenced by Mod_GenerateLightmaps_DestroyLightmaps(), R_Bloom_StartFrame(), R_BuildFogHeightTexture(), R_FreeTexturePool(), R_PurgeTexture(), R_RenderTarget_FreeUnused(), R_Shadow_BounceGrid_ConvertPixelsAndUpload(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_FreeDeferred(), R_Shadow_FreeShadowMaps(), r_shadow_newmap(), R_Shadow_UpdateBounceGridTexture(), and SCR_ClearLoadingScreenTexture().
void R_FreeTexturePool | ( | rtexturepool_t ** | rtexturepool | ) |
Definition at line 403 of file gl_textures.c.
References gltexturepool_t::gltchain, gltexturepoolchain, Host_Error(), Mem_Free, gltexturepool_t::next, NULL, R_FreeTexture(), gltexturepool_t::sentinel, and TEXTUREPOOL_SENTINEL.
Referenced by cl_video_shutdown(), gl_draw_shutdown(), gl_main_shutdown(), Mod_UnloadModel(), r_explosion_shutdown(), r_part_shutdown(), R_Shadow_MakeTextures(), r_shadow_shutdown(), r_sky_shutdown(), and r_textures_shutdown().
|
static |
Definition at line 255 of file gl_textures.c.
References viddef_support_t::ext_texture_compression_s3tc, flags, Host_Error(), NULL, viddef_t::support, TEXF_ALPHA, TEXF_COMPRESS, TEXTYPE_ALPHA, textype_alpha, TEXTYPE_BGRA, textype_bgra, textype_bgra_alpha, textype_bgra_alpha_compress, textype_bgra_compress, TEXTYPE_COLORBUFFER, textype_colorbuffer, TEXTYPE_COLORBUFFER16F, textype_colorbuffer16f, TEXTYPE_COLORBUFFER32F, textype_colorbuffer32f, textype_depth16, textype_depth24, textype_depth24stencil8, TEXTYPE_DEPTHBUFFER16, TEXTYPE_DEPTHBUFFER24, TEXTYPE_DEPTHBUFFER24STENCIL8, TEXTYPE_DXT1, textype_dxt1, TEXTYPE_DXT1A, textype_dxt1a, TEXTYPE_DXT3, textype_dxt3, TEXTYPE_DXT5, textype_dxt5, TEXTYPE_ETC1, TEXTYPE_PALETTE, textype_palette, textype_palette_alpha, TEXTYPE_RGBA, textype_rgba, textype_rgba_alpha, textype_rgba_alpha_compress, textype_rgba_compress, TEXTYPE_SHADOWMAP16_COMP, textype_shadowmap16_comp, TEXTYPE_SHADOWMAP16_RAW, textype_shadowmap16_raw, TEXTYPE_SHADOWMAP24_COMP, textype_shadowmap24_comp, TEXTYPE_SHADOWMAP24_RAW, textype_shadowmap24_raw, TEXTYPE_SRGB_BGRA, textype_sRGB_bgra, textype_sRGB_bgra_alpha, textype_sRGB_bgra_alpha_compress, textype_sRGB_bgra_compress, TEXTYPE_SRGB_DXT1, textype_sRGB_dxt1, TEXTYPE_SRGB_DXT1A, textype_sRGB_dxt1a, TEXTYPE_SRGB_DXT3, textype_sRGB_dxt3, TEXTYPE_SRGB_DXT5, textype_sRGB_dxt5, TEXTYPE_SRGB_PALETTE, textype_sRGB_palette, textype_sRGB_palette_alpha, TEXTYPE_SRGB_RGBA, textype_sRGB_rgba, textype_sRGB_rgba_alpha, textype_sRGB_rgba_alpha_compress, textype_sRGB_rgba_compress, and vid.
Referenced by R_LoadTextureDDSFile(), R_LoadTextureRenderBuffer(), and R_SetupTexture().
rtexture_t * R_LoadTexture2D | ( | rtexturepool_t * | rtexturepool, |
const char * | identifier, | ||
int | width, | ||
int | height, | ||
const unsigned char * | data, | ||
textype_t | textype, | ||
int | flags, | ||
int | miplevel, | ||
const unsigned int * | palette ) |
Definition at line 1352 of file gl_textures.c.
References data, flags, GLTEXTURETYPE_2D, height, R_SetupTexture(), and width.
Referenced by loadtextureimage(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_Q1BSP_LoadFaces(), Mod_Q3BSP_LoadLightmaps(), Mod_VBSP_LoadFaces(), R_Bloom_StartFrame(), R_BuildBlankTextures(), R_BuildFogHeightTexture(), R_BuildFogTexture(), R_BuildNoTexture(), r_explosion_start(), R_InitParticleTexture(), R_RenderTarget_Get(), R_Shadow_MakeShadowMap(), R_Shadow_MakeTextures(), R_Shadow_PrepareLights(), R_SkinFrame_GenerateTexturesFromQPixels(), R_SkinFrame_LoadExternal_SkinFrame(), R_SkinFrame_LoadInternal8bit(), R_SkinFrame_LoadInternalBGRA(), R_UpdateVariables(), and SCR_SetLoadingScreenTexture().
rtexture_t * R_LoadTexture3D | ( | rtexturepool_t * | rtexturepool, |
const char * | identifier, | ||
int | width, | ||
int | height, | ||
int | depth, | ||
const unsigned char * | data, | ||
textype_t | textype, | ||
int | flags, | ||
int | miplevel, | ||
const unsigned int * | palette ) |
Definition at line 1357 of file gl_textures.c.
References data, depth, flags, GLTEXTURETYPE_3D, height, R_SetupTexture(), and width.
Referenced by Mod_Q3BSP_LoadLightGrid(), and R_Shadow_BounceGrid_ConvertPixelsAndUpload().
rtexture_t * R_LoadTextureCubeMap | ( | rtexturepool_t * | rtexturepool, |
const char * | identifier, | ||
int | width, | ||
const unsigned char * | data, | ||
textype_t | textype, | ||
int | flags, | ||
int | miplevel, | ||
const unsigned int * | palette ) |
Definition at line 1362 of file gl_textures.c.
References data, flags, GLTEXTURETYPE_CUBEMAP, R_SetupTexture(), and width.
Referenced by R_BuildNormalizationCube(), R_BuildWhiteCube(), R_LoadCubemap(), and R_Shadow_MakeVSDCT().
rtexture_t * R_LoadTextureDDSFile | ( | rtexturepool_t * | rtexturepool, |
const char * | filename, | ||
qbool | srgb, | ||
int | flags, | ||
qbool * | hasalphaflag, | ||
float * | avgcolor, | ||
int | miplevel, | ||
qbool | optionaltexture ) |
Definition at line 1569 of file gl_textures.c.
References b, BuffLittleLong(), gltexture_t::bytesperpixel, ca_dedicated, gltexture_t::chain, CHECKGLERROR, CL_KeepaliveMessage(), cls, Con_DPrintf(), Con_Printf(), data, dp_strlcpy, viddef_support_t::ext_texture_compression_s3tc, viddef_support_t::ext_texture_srgb, f, flags, gltexture_t::flags, float, floor(), FS_DefaultExtension(), FS_LoadFile(), FS_StripExtension(), g, GL_ActiveTexture(), GL_SetupTextureParameters(), GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, gltexture_t::glformat, textypeinfo_t::glformat, gltexture_t::glinternalformat, textypeinfo_t::glinternalformat, gltexturepool_t::gltchain, GLTEXTURETYPE_2D, gltexture_t::gltexturetypeenum, gltexturetypeenums, gltexture_t::gltype, textypeinfo_t::gltype, i, gltexture_t::identifier, Image_LinearFloatFromsRGB, Image_MakeLinearColorsFromsRGB(), gltexture_t::inputdatasize, gltexture_t::inputdepth, gltexture_t::inputheight, gltexture_t::inputwidth, int(), cvar_t::integer, textypeinfo_t::internalbytesperpixel, INTOVERFLOW_ADD, INTOVERFLOW_DIV, INTOVERFLOW_MUL, INTOVERFLOW_NORMALIZE, Log_Printf(), Mem_Alloc, Mem_ExpandableArray_AllocRecord(), Mem_Free, gltexture_t::miplevels, NULL, gltexture_t::pool, r, R_GetTexTypeInfo(), R_Mesh_TexBound(), r_texture_dds_load_alphamode, r_texture_dds_load_logfailure, r_texture_dds_swdecode, viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, gltexture_t::sides, size, client_static_t::state, strlen(), viddef_t::support, target, tempmempool, TEXF_ALPHA, TEXF_MIPMAP, TEXF_RGBMULTIPLYBYALPHA, gltexture_t::texnum, texturearray, gltexture_t::texturetype, gltexture_t::textype, textypeinfo_t::textype, TEXTYPE_BGRA, TEXTYPE_DXT1, TEXTYPE_DXT1A, TEXTYPE_DXT3, TEXTYPE_DXT5, TEXTYPE_ETC1, TEXTYPE_RGBA, TEXTYPE_SRGB_DXT1, TEXTYPE_SRGB_DXT1A, TEXTYPE_SRGB_DXT3, TEXTYPE_SRGB_DXT5, TEXTYPE_SRGB_RGBA, gltexture_t::tiledepth, gltexture_t::tileheight, gltexture_t::tilewidth, Vector4Clear, and vid.
Referenced by R_SkinFrame_LoadExternal_SkinFrame().
rtexture_t * R_LoadTextureRenderBuffer | ( | rtexturepool_t * | rtexturepool, |
const char * | identifier, | ||
int | width, | ||
int | height, | ||
textype_t | textype ) |
Definition at line 1372 of file gl_textures.c.
References gltexture_t::bytesperpixel, ca_dedicated, gltexture_t::chain, CHECKGLERROR, cls, gltexture_t::dirty, dp_strlcpy, gltexture_t::flags, GL_RENDERBUFFER, GL_TEXTURE_2D, GL_Texture_CalcImageSize(), gltexture_t::glformat, textypeinfo_t::glformat, gltexture_t::glinternalformat, textypeinfo_t::glinternalformat, gltexture_t::glisdepthstencil, gltexturepool_t::gltchain, GLTEXTURETYPE_CUBEMAP, gltexture_t::gltexturetypeenum, gltexture_t::gltype, textypeinfo_t::gltype, height, gltexture_t::identifier, gltexture_t::inputdatasize, gltexture_t::inputdepth, gltexture_t::inputheight, gltexture_t::inputwidth, textypeinfo_t::internalbytesperpixel, Mem_ExpandableArray_AllocRecord(), gltexture_t::miplevel, gltexture_t::miplevels, NULL, gltexture_t::palette, gltexture_t::pool, R_GetTexTypeInfo(), gltexture_t::renderbuffernum, viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, gltexture_t::sides, client_static_t::state, TEXF_CLAMP, TEXF_FORCENEAREST, TEXF_RENDERTARGET, gltexture_t::texnum, texturearray, gltexture_t::texturetype, gltexture_t::textype, TEXTYPE_DEPTHBUFFER24STENCIL8, gltexture_t::tiledepth, gltexture_t::tileheight, gltexture_t::tilewidth, gltexture_t::updatecallback, gltexture_t::updatecallback_data, vid, and width.
Referenced by R_RenderTarget_Get(), R_Shadow_MakeShadowMap(), and R_Shadow_PrepareLights().
rtexture_t * R_LoadTextureShadowMap2D | ( | rtexturepool_t * | rtexturepool, |
const char * | identifier, | ||
int | width, | ||
int | height, | ||
textype_t | textype, | ||
qbool | filter ) |
Definition at line 1367 of file gl_textures.c.
References filter, GLTEXTURETYPE_2D, height, NULL, R_SetupTexture(), TEXF_CLAMP, TEXF_FORCELINEAR, TEXF_FORCENEAREST, TEXF_RENDERTARGET, and width.
Referenced by R_Shadow_MakeShadowMap().
Definition at line 821 of file gl_textures.c.
References colorconvertbuffer, Host_Error(), Mem_Alloc, Mem_Free, resizebuffer, resizebuffersize, size, and texturemempool.
Referenced by R_UploadFullTexture().
void R_MakeTextureDynamic | ( | rtexture_t * | rt, |
updatecallback_t | updatecallback, | ||
void * | data ) |
Definition at line 326 of file gl_textures.c.
References data, gltexture_t::flags, GLTEXF_DYNAMIC, gltexture_t::updatecallback, and gltexture_t::updatecallback_data.
Referenced by LinkVideoTexture().
void R_MarkDirtyTexture | ( | rtexture_t * | rt | ) |
Definition at line 312 of file gl_textures.c.
References gltexture_t::dirty, gltexture_t::flags, and GLTEXF_DYNAMIC.
Referenced by CL_Video_Frame().
Definition at line 2394 of file gl_textures.c.
References flags, gl_picmip, gl_picmip_other, gl_picmip_sprites, gl_picmip_world, cvar_t::integer, max, r_picmipsprites, r_picmipworld, TEXF_ISSPRITE, TEXF_ISWORLD, and TEXF_PICMIP.
Referenced by loadtextureimage(), R_SetupTexture(), and R_SkinFrame_LoadExternal_SkinFrame().
void R_PurgeTexture | ( | rtexture_t * | rt | ) |
Definition at line 344 of file gl_textures.c.
References flags, R_FreeTexture(), and TEXF_PERSISTENT.
Referenced by R_SkinFrame_PurgeSkinFrame().
int R_RealGetTexture | ( | rtexture_t * | rt | ) |
Definition at line 2358 of file gl_textures.c.
References gltexture_t::buffermodified, gltexture_t::bufferpixels, gltexture_t::bytesperpixel, gltexture_t::dirty, gltexture_t::flags, GLTEXF_DYNAMIC, gltexture_t::modified_maxs, gltexture_t::modified_mins, r_texture_white, R_UpdateDynamicTexture(), R_UploadFullTexture(), R_UploadPartialTexture(), gltexture_t::texnum, rtexture_t::texnum, gltexture_t::tileheight, gltexture_t::tilewidth, and VectorClear.
int R_SaveTextureDDSFile | ( | rtexture_t * | rt, |
const char * | filename, | ||
qbool | skipuncompressed, | ||
qbool | hasalpha ) |
Definition at line 1431 of file gl_textures.c.
References CHECKGLERROR, gltexture_t::flags, FS_WriteFile(), GL_ActiveTexture(), GL_BGRA, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_TEXTURE_INTERNAL_FORMAT, GL_UNSIGNED_BYTE, gl_version, gltexturetypeenums, internalformat, Mem_Alloc, Mem_Free, NULL, R_Mesh_TexBound(), ret, StoreLittleLong(), tempmempool, TEXF_MIPMAP, TEXF_RGBMULTIPLYBYALPHA, gltexture_t::texnum, gltexture_t::texturetype, gltexture_t::tileheight, and gltexture_t::tilewidth.
Referenced by R_SkinFrame_LoadExternal_SkinFrame().
|
static |
Definition at line 1126 of file gl_textures.c.
References gltexture_t::buffermodified, gltexture_t::bufferpixels, gltexture_t::bytesperpixel, ca_dedicated, gltexture_t::chain, CHECKGLERROR, cls, Con_Printf(), data, depth, gltexture_t::dirty, dp_strlcpy, viddef_support_t::ext_texture_srgb, flags, gltexture_t::flags, viddef_t::forcetextype, GL_Texture_CalcImageSize(), gltexture_t::glformat, textypeinfo_t::glformat, gltexture_t::glinternalformat, textypeinfo_t::glinternalformat, gltexture_t::glisdepthstencil, gltexturepool_t::gltchain, GLTEXTURETYPE_CUBEMAP, gltexture_t::gltexturetypeenum, gltexturetypeenums, gltexture_t::gltype, textypeinfo_t::gltype, height, i, gltexture_t::identifier, Image_CopyMux(), Image_MakeLinearColorsFromsRGB(), textypeinfo_t::inputbytesperpixel, gltexture_t::inputdatasize, gltexture_t::inputdepth, gltexture_t::inputheight, gltexture_t::inputwidth, textypeinfo_t::internalbytesperpixel, Mem_Alloc, Mem_ExpandableArray_AllocRecord(), Mem_Free, gltexture_t::miplevel, gltexture_t::miplevels, gltexture_t::modified_maxs, gltexture_t::modified_mins, NULL, gltexture_t::palette, gltexture_t::pool, R_GetTexTypeInfo(), R_PicmipForFlags(), R_UploadFullTexture(), viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, gltexture_t::sides, size, client_static_t::state, viddef_t::support, Sys_Error(), tempmempool, TEXF_ALLOWUPDATES, TEXF_ALPHA, gltexture_t::texnum, texturearray, texturemempool, gltexture_t::texturetype, gltexture_t::textype, TEXTYPE_ALPHA, TEXTYPE_BGRA, TEXTYPE_COLORBUFFER, TEXTYPE_COLORBUFFER16F, TEXTYPE_COLORBUFFER32F, TEXTYPE_DXT1, TEXTYPE_DXT1A, TEXTYPE_DXT3, TEXTYPE_DXT5, TEXTYPE_PALETTE, TEXTYPE_RGBA, TEXTYPE_SHADOWMAP16_COMP, TEXTYPE_SHADOWMAP16_RAW, TEXTYPE_SHADOWMAP24_COMP, TEXTYPE_SHADOWMAP24_RAW, TEXTYPE_SRGB_BGRA, TEXTYPE_SRGB_DXT1, TEXTYPE_SRGB_DXT1A, TEXTYPE_SRGB_DXT3, TEXTYPE_SRGB_DXT5, TEXTYPE_SRGB_PALETTE, TEXTYPE_SRGB_RGBA, gltexture_t::tiledepth, gltexture_t::tileheight, gltexture_t::tilewidth, gltexture_t::updatecallback, gltexture_t::updatecallback_data, VectorClear, vid, and width.
Referenced by R_LoadTexture2D(), R_LoadTexture3D(), R_LoadTextureCubeMap(), and R_LoadTextureShadowMap2D().
int R_TextureFlags | ( | rtexture_t * | rt | ) |
Definition at line 2280 of file gl_textures.c.
Referenced by R_SetupShader_Surface().
int R_TextureHeight | ( | rtexture_t * | rt | ) |
Definition at line 2275 of file gl_textures.c.
Referenced by Draw_CachePic_Flags(), Mod_Q3BSP_LoadFaces(), and R_Shadow_SetShadowmapParametersForLight().
Definition at line 681 of file gl_textures.c.
References gltexture_t::flags, i, int(), Mem_ExpandableArray_IndexRange(), Mem_ExpandableArray_RecordAtIndex(), viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, TEXF_RENDERTARGET, texturearray, and vid.
Referenced by R_Textures_Init().
Definition at line 700 of file gl_textures.c.
References gltexture_t::flags, i, int(), Mem_ExpandableArray_IndexRange(), Mem_ExpandableArray_RecordAtIndex(), viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, TEXF_RENDERTARGET, texturearray, and vid.
Referenced by R_Textures_Init().
Definition at line 753 of file gl_textures.c.
References bound, gltexture_t::chain, CHECKGLERROR, colorconvertbuffer, Cvar_SetValueQuick(), gltexture_t::flags, GL_ActiveTexture(), gl_texture_anisotropy, GL_TEXTURE_MAX_ANISOTROPY_EXT, gltexturepool_t::gltchain, gltexturepoolchain, gltexturetypeenums, cvar_t::integer, viddef_t::max_anisotropy, Mem_Free, gltexturepool_t::next, NULL, R_Mesh_TexBound(), viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, resizebuffer, resizebuffersize, TEXF_MIPMAP, gltexture_t::texnum, gltexture_t::texturetype, and vid.
Referenced by R_UpdateVariables().
Definition at line 720 of file gl_textures.c.
References CF_CLIENT, Cmd_AddCommand(), Cvar_RegisterVariable(), gl_max_lightmapsize, gl_max_size, gl_picmip, gl_picmip_other, gl_picmip_sprites, gl_picmip_world, gl_texture_anisotropy, gl_texturecompression, gl_texturecompression_2d, gl_texturecompression_color, gl_texturecompression_gloss, gl_texturecompression_glow, gl_texturecompression_lightcubemaps, gl_texturecompression_normal, gl_texturecompression_q3bspdeluxemaps, gl_texturecompression_q3bsplightmaps, gl_texturecompression_reflectmask, gl_texturecompression_sky, gl_texturecompression_sprites, GL_TextureMode_f(), r_lerpimages, r_picmipsprites, r_picmipworld, R_RegisterModule(), r_texture_dds_load_alphamode, r_texture_dds_load_logfailure, r_texture_dds_swdecode, r_textures_devicelost(), r_textures_devicerestored(), r_textures_newmap(), r_textures_shutdown(), r_textures_start(), and R_TextureStats_f().
Referenced by Render_Init().
Definition at line 657 of file gl_textures.c.
References colorconvertbuffer, gltexturepoolchain, JPEG_CloseLibrary(), Mem_ExpandableArray_FreeArray(), Mem_FreePool, NULL, R_FreeTexturePool(), resizebuffer, resizebuffersize, texturearray, texturebuffer, and texturemempool.
Referenced by R_Textures_Init().
Definition at line 634 of file gl_textures.c.
References CHECKGLERROR, Cvar_SetValueQuick(), GL_PACK_ALIGNMENT, GL_UNPACK_ALIGNMENT, JPEG_OpenLibrary(), Mem_AllocPool, Mem_ExpandableArray_NewArray(), NULL, PNG_OpenLibrary(), viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, scr_screenshot_jpeg, scr_screenshot_png, texturearray, texturemempool, and vid.
Referenced by R_Textures_Init().
|
static |
Definition at line 629 of file gl_textures.c.
References R_TextureStats_Print().
Referenced by R_Textures_Init().
Definition at line 582 of file gl_textures.c.
References gltexture_t::chain, Con_Print(), Con_Printf(), gltexture_t::flags, gltexturepool_t::gltchain, gltexturepoolchain, gltexture_t::identifier, gltexture_t::inputdatasize, gltexture_t::inputtexels, textypeinfo_t::name, gltexturepool_t::next, R_CalcTexelDataSize(), gltexture_t::renderbuffernum, TEXF_ALPHA, TEXF_MIPMAP, gltexture_t::texnum, and gltexture_t::textype.
Referenced by R_TextureStats_f().
int R_TextureWidth | ( | rtexture_t * | rt | ) |
Definition at line 2270 of file gl_textures.c.
Referenced by Draw_CachePic_Flags(), Mod_Q3BSP_LoadFaces(), and R_Shadow_SetShadowmapParametersForLight().
|
static |
Definition at line 337 of file gl_textures.c.
References gltexture_t::dirty, and gltexture_t::updatecallback.
Referenced by R_RealGetTexture().
void R_UpdateTexture | ( | rtexture_t * | rt, |
const unsigned char * | data, | ||
int | x, | ||
int | y, | ||
int | z, | ||
int | width, | ||
int | height, | ||
int | depth, | ||
int | combine ) |
Definition at line 2285 of file gl_textures.c.
References gltexture_t::buffermodified, gltexture_t::bufferpixels, gltexture_t::bytesperpixel, Con_DPrintf(), data, depth, gltexture_t::dirty, height, Host_Error(), gltexture_t::identifier, gltexture_t::inputdepth, max, min, gltexture_t::modified_maxs, gltexture_t::modified_mins, NULL, R_UploadFullTexture(), R_UploadPartialTexture(), gltexture_t::sides, gltexture_t::texnum, gltexture_t::tiledepth, gltexture_t::tileheight, gltexture_t::tilewidth, width, x, y, and z.
Referenced by Draw_NewPic(), R_BuildFogTexture(), R_BuildLightMap(), R_Shadow_BounceGrid_ConvertPixelsAndUpload(), and R_UpdateVariables().
|
static |
Definition at line 965 of file gl_textures.c.
References alpha, gltexture_t::bytesperpixel, CHECKGLERROR, colorconvertbuffer, cubemapside, data, depth, gltexture_t::flags, GL_ActiveTexture(), GL_FASTEST, GL_NICEST, GL_SetupTextureParameters(), GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_COMPRESSION_HINT, gl_texturecompression, gltexture_t::glformat, gltexture_t::glinternalformat, GLTEXTURETYPE_2D, GLTEXTURETYPE_3D, GLTEXTURETYPE_CUBEMAP, gltexturetypeenums, gltexture_t::gltype, height, i, gltexture_t::identifier, Image_Copy8bitBGRA(), Image_MipReduce32(), Image_Resample32(), textypeinfo_t::inputbytesperpixel, gltexture_t::inputdepth, gltexture_t::inputheight, gltexture_t::inputwidth, cvar_t::integer, NULL, gltexture_t::palette, r_lerpimages, R_MakeResizeBufferBigger(), R_Mesh_TexBound(), viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, resizebuffer, gltexture_t::sides, Sys_Error(), TEXF_MIPMAP, TEXF_RGBMULTIPLYBYALPHA, gltexture_t::texnum, texturebuffer, gltexture_t::texturetype, gltexture_t::textype, textypeinfo_t::textype, TEXTYPE_PALETTE, gltexture_t::tiledepth, gltexture_t::tileheight, gltexture_t::tilewidth, vid, and width.
Referenced by R_ClearTexture(), R_RealGetTexture(), R_SetupTexture(), and R_UpdateTexture().
|
static |
Definition at line 928 of file gl_textures.c.
References CHECKGLERROR, data, gltexture_t::flags, GL_ActiveTexture(), GL_TEXTURE_2D, gltexture_t::glformat, GLTEXTURETYPE_2D, gltexturetypeenums, gltexture_t::gltype, gltexture_t::identifier, gltexture_t::inputheight, gltexture_t::inputwidth, NULL, R_Mesh_TexBound(), viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, Sys_Error(), TEXF_MIPMAP, TEXF_PICMIP, gltexture_t::texnum, gltexture_t::texturetype, gltexture_t::textype, textypeinfo_t::textype, TEXTYPE_PALETTE, gltexture_t::tiledepth, gltexture_t::tileheight, gltexture_t::tilewidth, and vid.
Referenced by R_RealGetTexture(), and R_UpdateTexture().
|
static |
Definition at line 251 of file gl_textures.c.
Referenced by R_MakeResizeBufferBigger(), R_Textures_Frame(), r_textures_shutdown(), and R_UploadFullTexture().
|
static |
Definition at line 168 of file gl_textures.c.
Referenced by R_UploadFullTexture().
Definition at line 53 of file gl_textures.c.
Referenced by GL_SetupTextureParameters(), and GL_TextureMode_f().
Definition at line 55 of file gl_textures.c.
Referenced by GL_SetupTextureParameters(), and GL_TextureMode_f().
int gl_filter_min = GL_LINEAR_MIPMAP_LINEAR |
Definition at line 54 of file gl_textures.c.
Referenced by GL_SetupTextureParameters(), and GL_TextureMode_f().
cvar_t gl_max_lightmapsize = {CF_CLIENT | CF_ARCHIVE, "gl_max_lightmapsize", "512", "maximum allowed texture size for lightmap textures, use larger values to improve rendering speed, as long as there is enough video memory available (setting it too high for the hardware will cause very bad performance)"} |
Definition at line 28 of file gl_textures.c.
Referenced by Mod_Q1BSP_LoadFaces(), Mod_VBSP_LoadFaces(), and R_Textures_Init().
cvar_t gl_max_size = {CF_CLIENT | CF_ARCHIVE, "gl_max_size", "2048", "maximum allowed texture size, can be used to reduce video memory usage, limited by hardware capabilities (typically 2048, 4096, or 8192)"} |
Definition at line 27 of file gl_textures.c.
Referenced by GL_Texture_CalcImageSize(), and R_Textures_Init().
cvar_t gl_picmip = {CF_CLIENT | CF_ARCHIVE, "gl_picmip", "0", "reduces resolution of textures by powers of 2, for example 1 will halve width/height, reducing texture memory usage by 75%"} |
Definition at line 29 of file gl_textures.c.
Referenced by M_Menu_Video_AdjustSliders(), M_Video_Draw(), R_PicmipForFlags(), and R_Textures_Init().
cvar_t gl_picmip_other = {CF_CLIENT | CF_ARCHIVE, "gl_picmip_other", "0", "extra picmip level for other textures (may be negative, which will then reduce gl_picmip for these)"} |
Definition at line 34 of file gl_textures.c.
Referenced by R_PicmipForFlags(), and R_Textures_Init().
cvar_t gl_picmip_sprites = {CF_CLIENT | CF_ARCHIVE, "gl_picmip_sprites", "0", "extra picmip level for sprite textures (may be negative, which will then reduce gl_picmip for these)"} |
Definition at line 32 of file gl_textures.c.
Referenced by R_PicmipForFlags(), and R_Textures_Init().
cvar_t gl_picmip_world = {CF_CLIENT | CF_ARCHIVE, "gl_picmip_world", "0", "extra picmip level for world textures (may be negative, which will then reduce gl_picmip for these)"} |
Definition at line 30 of file gl_textures.c.
Referenced by R_PicmipForFlags(), and R_Textures_Init().
cvar_t gl_texture_anisotropy = {CF_CLIENT | CF_ARCHIVE, "gl_texture_anisotropy", "1", "anisotropic filtering quality (if supported by hardware), 1 sample (no anisotropy) and 8 sample (8 tap anisotropy) are recommended values"} |
Definition at line 36 of file gl_textures.c.
Referenced by GL_SetupTextureParameters(), M_Menu_Video_AdjustSliders(), M_Video_Draw(), R_Textures_Frame(), and R_Textures_Init().
cvar_t gl_texturecompression = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression", "0", "whether to compress textures, a value of 0 disables compression (even if the individual cvars are 1), 1 enables fast (low quality) compression at startup, 2 enables slow (high quality) compression at startup"} |
Definition at line 37 of file gl_textures.c.
Referenced by Draw_CachePic_Flags(), M_Menu_Video_AdjustSliders(), M_Video_Draw(), Mod_Sprite_SharedSetup(), R_LoadCubemap(), R_SkinFrame_LoadExternal_SkinFrame(), R_Textures_Init(), and R_UploadFullTexture().
cvar_t gl_texturecompression_2d = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_2d", "0", "whether to compress 2d (hud/menu) textures other than the font"} |
Definition at line 42 of file gl_textures.c.
Referenced by Draw_CachePic_Flags(), and R_Textures_Init().
cvar_t gl_texturecompression_color = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_color", "1", "whether to compress colormap (diffuse) textures"} |
Definition at line 38 of file gl_textures.c.
Referenced by GL_Setup(), R_SkinFrame_LoadExternal_SkinFrame(), and R_Textures_Init().
cvar_t gl_texturecompression_gloss = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_gloss", "1", "whether to compress glossmap (specular) textures"} |
Definition at line 40 of file gl_textures.c.
Referenced by R_SkinFrame_LoadExternal_SkinFrame(), and R_Textures_Init().
cvar_t gl_texturecompression_glow = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_glow", "1", "whether to compress glowmap (luma) textures"} |
Definition at line 41 of file gl_textures.c.
Referenced by R_SkinFrame_LoadExternal_SkinFrame(), and R_Textures_Init().
cvar_t gl_texturecompression_lightcubemaps = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_lightcubemaps", "1", "whether to compress light cubemaps (spotlights and other light projection images)"} |
Definition at line 46 of file gl_textures.c.
Referenced by R_LoadCubemap(), and R_Textures_Init().
cvar_t gl_texturecompression_normal = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_normal", "0", "whether to compress normalmap (normalmap) textures"} |
Definition at line 39 of file gl_textures.c.
Referenced by R_SkinFrame_LoadExternal_SkinFrame(), and R_Textures_Init().
cvar_t gl_texturecompression_q3bspdeluxemaps = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_q3bspdeluxemaps", "0", "whether to compress deluxemaps in q3bsp format levels (only levels compiled with q3map2 -deluxe have these)"} |
Definition at line 44 of file gl_textures.c.
Referenced by Mod_Q3BSP_LoadLightmaps(), and R_Textures_Init().
cvar_t gl_texturecompression_q3bsplightmaps = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_q3bsplightmaps", "0", "whether to compress lightmaps in q3bsp format levels"} |
Definition at line 43 of file gl_textures.c.
Referenced by Mod_Q3BSP_LoadLightmaps(), and R_Textures_Init().
cvar_t gl_texturecompression_reflectmask = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_reflectmask", "1", "whether to compress reflection cubemap masks (mask of which areas of the texture should reflect the generic shiny cubemap)"} |
Definition at line 47 of file gl_textures.c.
Referenced by R_SkinFrame_LoadExternal_SkinFrame(), and R_Textures_Init().
cvar_t gl_texturecompression_sky = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_sky", "0", "whether to compress sky textures"} |
cvar_t gl_texturecompression_sprites = {CF_CLIENT | CF_ARCHIVE, "gl_texturecompression_sprites", "1", "whether to compress sprites"} |
Definition at line 48 of file gl_textures.c.
Referenced by Mod_Sprite_SharedSetup(), and R_Textures_Init().
|
static |
Definition at line 249 of file gl_textures.c.
Referenced by GL_TextureMode_f(), R_AllocTexturePool(), R_FreeTexturePool(), R_Textures_Frame(), r_textures_shutdown(), and R_TextureStats_Print().
|
static |
Definition at line 166 of file gl_textures.c.
Referenced by GL_SetupTextureParameters().
|
static |
Definition at line 164 of file gl_textures.c.
Referenced by GL_SetupTextureParameters(), GL_TextureMode_f(), R_LoadTextureDDSFile(), R_SaveTextureDDSFile(), R_SetupTexture(), R_Textures_Frame(), R_UploadFullTexture(), and R_UploadPartialTexture().
|
static |
Definition at line 432 of file gl_textures.c.
Referenced by GL_TextureMode_f(), VID_ListModes(), and VID_SortModes().
cvar_t r_lerpimages = {CF_CLIENT | CF_ARCHIVE, "r_lerpimages", "1", "bilinear filters images when scaling them up to power of 2 size (mode 1), looks better than glquake (mode 0)"} |
Definition at line 35 of file gl_textures.c.
Referenced by R_Textures_Init(), and R_UploadFullTexture().
cvar_t r_picmipsprites = {CF_CLIENT | CF_ARCHIVE, "r_picmipsprites", "1", "make gl_picmip affect sprites too (saves some graphics memory in sprite heavy games) (setting this to 0 is a shorthand for gl_picmip_sprites -9999999)"} |
Definition at line 33 of file gl_textures.c.
Referenced by R_PicmipForFlags(), and R_Textures_Init().
cvar_t r_picmipworld = {CF_CLIENT | CF_ARCHIVE, "r_picmipworld", "1", "whether gl_picmip shall apply to world textures too (setting this to 0 is a shorthand for gl_picmip_world -9999999)"} |
Definition at line 31 of file gl_textures.c.
Referenced by R_PicmipForFlags(), and R_Textures_Init().
cvar_t r_texture_dds_load_alphamode = {CF_CLIENT, "r_texture_dds_load_alphamode", "1", "0: trust DDPF_ALPHAPIXELS flag, 1: texture format and brute force search if ambiguous, 2: texture format only"} |
Definition at line 49 of file gl_textures.c.
Referenced by R_LoadTextureDDSFile(), and R_Textures_Init().
cvar_t r_texture_dds_load_logfailure = {CF_CLIENT, "r_texture_dds_load_logfailure", "0", "log missing DDS textures to ddstexturefailures.log, 0: done log, 1: log with no optional textures (_norm, glow etc.). 2: log all"} |
Definition at line 50 of file gl_textures.c.
Referenced by R_LoadTextureDDSFile(), and R_Textures_Init().
cvar_t r_texture_dds_swdecode = {CF_CLIENT, "r_texture_dds_swdecode", "0", "0: don't software decode DDS, 1: software decode DDS if unsupported, 2: always software decode DDS"} |
Definition at line 51 of file gl_textures.c.
Referenced by R_LoadTextureDDSFile(), and R_Textures_Init().
|
static |
Definition at line 251 of file gl_textures.c.
Referenced by R_MakeResizeBufferBigger(), R_Textures_Frame(), r_textures_shutdown(), and R_UploadFullTexture().
|
static |
Definition at line 252 of file gl_textures.c.
Referenced by R_MakeResizeBufferBigger(), R_Textures_Frame(), and r_textures_shutdown().
|
static |
Definition at line 59 of file gl_textures.c.
Referenced by R_FreeTexture(), R_LoadTextureDDSFile(), R_LoadTextureRenderBuffer(), R_SetupTexture(), r_textures_devicelost(), r_textures_devicerestored(), r_textures_shutdown(), and r_textures_start().
|
static |
Definition at line 253 of file gl_textures.c.
Referenced by r_textures_shutdown(), and R_UploadFullTexture().
|
static |
Definition at line 58 of file gl_textures.c.
Referenced by R_AllocTexturePool(), R_MakeResizeBufferBigger(), R_SetupTexture(), r_textures_shutdown(), and r_textures_start().
|
static |
|
static |
|
static |
|
static |
Definition at line 134 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
Definition at line 133 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
|
static |
|
static |
|
static |
Definition at line 116 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
Definition at line 117 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
Definition at line 118 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 130 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
Definition at line 129 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
Definition at line 112 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
Definition at line 113 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
Definition at line 114 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
Definition at line 115 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
|
static |
|
static |
Definition at line 148 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
Definition at line 147 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
|
static |
Definition at line 150 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
Definition at line 151 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
|
static |
|
static |
Definition at line 140 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
|
static |
|
static |
Definition at line 144 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().
|
static |
Definition at line 143 of file gl_textures.c.
Referenced by R_GetTexTypeInfo().