q2w bsp format support.
automatic lightmap texture scaling to retain more performance on large maps. r_clutter preliminary implementation should probably fix up the shader still. CSQC_Parse_Damage implemented. finally implement q2 inventory. fix mixer overflow crash. glsl can now use s_diffuse etc to force inclusion of a diffuse sampler/texture, meaning shaders don't need to include them. fix issue with writeip git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4841 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
02ab57490e
commit
bed989f529
100 changed files with 3502 additions and 2204 deletions
|
@ -321,6 +321,18 @@ qboolean GL_LoadTextureMips(texid_t tex, struct pendingtextureinfo *mips)
|
|||
qglTexParameteri(targ, GL_TEXTURE_WRAP_R, GL_REPEAT);
|
||||
}
|
||||
|
||||
//make sure the texture is complete even if the mips are not.
|
||||
//note that some drivers will just ignore levels that are not valid.
|
||||
//this means that we can't make this setting dynamic, so we might as well let the drivers know BEFORE we do the uploads, to be kind to those that are buggy..
|
||||
if (!gl_config.gles)
|
||||
{
|
||||
if (targ != GL_TEXTURE_CUBE_MAP_ARB && (tex->flags & IF_MIPCAP))
|
||||
{
|
||||
qglTexParameteri(targ, GL_TEXTURE_BASE_LEVEL, min(mips->mipcount-1, gl_mipcap_min));
|
||||
qglTexParameteri(targ, GL_TEXTURE_MAX_LEVEL, min(mips->mipcount-1, gl_mipcap_max));
|
||||
}
|
||||
}
|
||||
|
||||
tex->width = mips->mip[0].width;
|
||||
tex->height = mips->mip[0].height;
|
||||
GL_Texturemode_Apply(targ, tex->flags);
|
||||
|
@ -443,14 +455,6 @@ qboolean GL_LoadTextureMips(texid_t tex, struct pendingtextureinfo *mips)
|
|||
Z_Free(mips->mip[i].data);
|
||||
}
|
||||
}
|
||||
if (!gl_config.gles) //make sure the texture is complete even if the mips are not.
|
||||
{
|
||||
if (targ != GL_TEXTURE_CUBE_MAP_ARB && (tex->flags & IF_MIPCAP))
|
||||
{
|
||||
qglTexParameteri(targ, GL_TEXTURE_BASE_LEVEL, min(mips->mipcount-1, gl_mipcap_min));
|
||||
qglTexParameteri(targ, GL_TEXTURE_MAX_LEVEL, min(mips->mipcount-1, gl_mipcap_max));
|
||||
}
|
||||
}
|
||||
|
||||
if (mips->extrafree)
|
||||
Z_Free(mips->extrafree);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue