Tweaks to fix stuff that I broke.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4599 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
db77a84453
commit
ae55a11a1c
9 changed files with 36 additions and 17 deletions
|
@ -343,6 +343,7 @@ typedef struct rendererinfo_s {
|
|||
void (*BE_VBO_Data)(vbobctx_t *ctx, void *data, unsigned int size, vboarray_t *varray);
|
||||
void (*BE_VBO_Finish)(vbobctx_t *ctx, void *edata, unsigned int esize, vboarray_t *earray);
|
||||
void (*BE_VBO_Destroy)(vboarray_t *vearray);
|
||||
void (*BE_RenderToTextureUpdate2d)(qboolean destchanged);
|
||||
char *alignment;
|
||||
} rendererinfo_t;
|
||||
|
||||
|
@ -377,6 +378,8 @@ typedef struct rendererinfo_s {
|
|||
#define BE_VBO_Destroy rf->BE_VBO_Destroy
|
||||
#define BE_Scissor rf->BE_Scissor
|
||||
|
||||
#define BE_RenderToTextureUpdate2d rf->BE_RenderToTextureUpdate2d
|
||||
|
||||
texid_t R2D_RT_Configure(unsigned int id, int width, int height, uploadfmt_t rtfmt);
|
||||
texid_t R2D_RT_GetTexture(unsigned int id, unsigned int *width, unsigned int *height);
|
||||
|
||||
|
|
|
@ -1551,7 +1551,7 @@ static void QCBUILTIN PF_R_SetViewFlag(pubprogfuncs_t *prinst, struct globalvars
|
|||
R2D_RT_Configure(*p, size[0], size[1], fmt);
|
||||
}
|
||||
r_refdef.rt_destcolour = *p;
|
||||
GLBE_RenderToTextureUpdate2d(true);
|
||||
BE_RenderToTextureUpdate2d(true);
|
||||
break;
|
||||
case VF_RT_SOURCECOLOUR:
|
||||
if (prinst->callargc >= 4)
|
||||
|
@ -1561,7 +1561,7 @@ static void QCBUILTIN PF_R_SetViewFlag(pubprogfuncs_t *prinst, struct globalvars
|
|||
R2D_RT_Configure(*p, size[0], size[1], fmt);
|
||||
}
|
||||
r_refdef.rt_sourcecolour = *p;
|
||||
GLBE_RenderToTextureUpdate2d(false);
|
||||
BE_RenderToTextureUpdate2d(false);
|
||||
break;
|
||||
case VF_RT_DEPTH:
|
||||
if (prinst->callargc >= 4)
|
||||
|
@ -1571,7 +1571,7 @@ static void QCBUILTIN PF_R_SetViewFlag(pubprogfuncs_t *prinst, struct globalvars
|
|||
R2D_RT_Configure(*p, size[0], size[1], fmt);
|
||||
}
|
||||
r_refdef.rt_depth = *p;
|
||||
GLBE_RenderToTextureUpdate2d(false);
|
||||
BE_RenderToTextureUpdate2d(false);
|
||||
break;
|
||||
case VF_RT_RIPPLE:
|
||||
if (prinst->callargc >= 4)
|
||||
|
@ -1581,7 +1581,7 @@ static void QCBUILTIN PF_R_SetViewFlag(pubprogfuncs_t *prinst, struct globalvars
|
|||
R2D_RT_Configure(*p, size[0], size[1], fmt);
|
||||
}
|
||||
r_refdef.rt_ripplemap = *p;
|
||||
GLBE_RenderToTextureUpdate2d(false);
|
||||
BE_RenderToTextureUpdate2d(false);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -343,7 +343,7 @@ cvar_t r_shadow_bumpscale_bumpmap = CVARD ("r_shadow_bumpscale_bumpmap", "4",
|
|||
cvar_t r_glsl_offsetmapping = CVARFD ("r_glsl_offsetmapping", "0", CVAR_ARCHIVE|CVAR_SHADERSYSTEM, "Enables the use of paralax mapping, adding fake depth to textures.");
|
||||
cvar_t r_glsl_offsetmapping_scale = CVAR ("r_glsl_offsetmapping_scale", "0.04");
|
||||
cvar_t r_glsl_offsetmapping_reliefmapping = CVARFD("r_glsl_offsetmapping_reliefmapping", "1", CVAR_ARCHIVE|CVAR_SHADERSYSTEM, "Changes the paralax sampling mode to be a bit nicer. r_glsl_offsetmapping must be set.");
|
||||
//cvar_t r_glsl_turbscale = CVARF ("r_glsl_turbscale", "1", CVAR_ARCHIVE);
|
||||
cvar_t r_glsl_turbscale = CVARFD ("r_glsl_turbscale", "1", CVAR_ARCHIVE, "Controls the strength of water ripples (used by the altwater glsl code).");
|
||||
|
||||
cvar_t r_waterstyle = CVARFD ("r_waterstyle", "1", CVAR_ARCHIVE|CVAR_SHADERSYSTEM, "Changes how water, and teleporters are drawn. Possible values are:\n0: fastturb-style block colour.\n1: regular q1-style water.\n2: refraction(ripply and transparent)\n3: refraction with reflection at an angle\n4: ripplemapped without reflections (requires particle effects)\n5: ripples+reflections");
|
||||
cvar_t r_slimestyle = CVARFD ("r_slimestyle", "", CVAR_ARCHIVE|CVAR_SHADERSYSTEM, "See r_waterstyle, but affects only slime. If empty, defers to r_waterstyle.");
|
||||
|
@ -420,7 +420,7 @@ void GLRenderer_Init(void)
|
|||
Cvar_Register (&r_glsl_offsetmapping, GRAPHICALNICETIES);
|
||||
Cvar_Register (&r_glsl_offsetmapping_scale, GRAPHICALNICETIES);
|
||||
Cvar_Register (&r_glsl_offsetmapping_reliefmapping, GRAPHICALNICETIES);
|
||||
// Cvar_Register (&r_glsl_turbscale, GRAPHICALNICETIES);
|
||||
Cvar_Register (&r_glsl_turbscale, GRAPHICALNICETIES);
|
||||
|
||||
|
||||
#ifdef R_XFLIP
|
||||
|
@ -816,6 +816,8 @@ rendererinfo_t dedicatedrendererinfo = {
|
|||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
|
||||
""
|
||||
};
|
||||
rendererinfo_t *pdedicatedrendererinfo = &dedicatedrendererinfo;
|
||||
|
|
|
@ -836,10 +836,11 @@ static qboolean FSZIP_ValidateLocalHeader(zipfile_t *zip, zpackfile_t *zfile, qo
|
|||
}
|
||||
break;
|
||||
default:
|
||||
Con_Printf("Unknown chunk %x\n", extrachunk_tag);
|
||||
/* Con_Printf("Unknown chunk %x\n", extrachunk_tag);
|
||||
case 0x000a: //NTFS (timestamps)
|
||||
case 0x5455: //extended timestamp
|
||||
case 0x7875: //unix uid/gid
|
||||
extra += extrachunk_len;
|
||||
*/ extra += extrachunk_len;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -946,10 +947,11 @@ static qboolean FSZIP_ReadCentralEntry(zipfile_t *zip, qbyte *data, struct zipce
|
|||
}
|
||||
break;
|
||||
default:
|
||||
Con_Printf("Unknown chunk %x\n", extrachunk_tag);
|
||||
/* Con_Printf("Unknown chunk %x\n", extrachunk_tag);
|
||||
case 0x000a: //NTFS (timestamps)
|
||||
case 0x5455: //extended timestamp
|
||||
case 0x7875: //unix uid/gid
|
||||
extra += extrachunk_len;
|
||||
*/ extra += extrachunk_len;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1212,7 +1212,9 @@ void (D3D9_SCR_UpdateScreen) (void);
|
|||
|
||||
|
||||
|
||||
|
||||
void D3D9BE_RenderToTextureUpdate2d(qboolean destchanged)
|
||||
{
|
||||
}
|
||||
|
||||
rendererinfo_t d3d9rendererinfo =
|
||||
{
|
||||
|
@ -1272,6 +1274,8 @@ rendererinfo_t d3d9rendererinfo =
|
|||
D3D9BE_VBO_Finish,
|
||||
D3D9BE_VBO_Destroy,
|
||||
|
||||
D3D9BE_RenderToTextureUpdate2d,
|
||||
|
||||
"no more"
|
||||
};
|
||||
|
||||
|
|
|
@ -1199,6 +1199,10 @@ static void (D3D11_R_RenderView) (void)
|
|||
D3D11_Set2D ();
|
||||
}
|
||||
|
||||
void D3D11BE_RenderToTextureUpdate2d(qboolean destchanged)
|
||||
{
|
||||
}
|
||||
|
||||
rendererinfo_t d3d11rendererinfo =
|
||||
{
|
||||
"Direct3D11",
|
||||
|
@ -1257,6 +1261,8 @@ rendererinfo_t d3d11rendererinfo =
|
|||
D3D11BE_VBO_Finish,
|
||||
D3D11BE_VBO_Destroy,
|
||||
|
||||
D3D11BE_RenderToTextureUpdate2d,
|
||||
|
||||
"no more"
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -994,11 +994,11 @@ void GLR_DrawPortal(batch_t *batch, batch_t **blist, batch_t *depthmasklist[2],
|
|||
VectorCopy(plane.normal, fp.normal);
|
||||
fp.dist = plane.dist;
|
||||
|
||||
if (DotProduct(fp.normal, vpn) < 0)
|
||||
{
|
||||
VectorNegate(fp.normal, fp.normal);
|
||||
fp.dist *= -1;
|
||||
}
|
||||
// if (DotProduct(fp.normal, vpn) < 0)
|
||||
// {
|
||||
// VectorNegate(fp.normal, fp.normal);
|
||||
// fp.dist *= -1;
|
||||
// }
|
||||
|
||||
fp.type = PLANE_ANYZ;
|
||||
fp.signbits = SignbitsForPlane (&fp);
|
||||
|
|
|
@ -2045,6 +2045,8 @@ rendererinfo_t openglrendererinfo = {
|
|||
GLBE_VBO_Finish,
|
||||
GLBE_VBO_Destroy,
|
||||
|
||||
GLBE_RenderToTextureUpdate2d,
|
||||
|
||||
""
|
||||
};
|
||||
|
||||
|
|
|
@ -1975,7 +1975,7 @@ void QCC_CRC_Init(unsigned short *crcvalue)
|
|||
|
||||
void QCC_CRC_ProcessByte(unsigned short *crcvalue, qbyte data)
|
||||
{
|
||||
*crcvalue = (*crcvalue << 8) ^ QCC_crctable[(*crcvalue >> 8) ^ data];
|
||||
*crcvalue = ((*crcvalue << 8) ^ QCC_crctable[(*crcvalue >> 8) ^ data]) & 0xffff;
|
||||
}
|
||||
|
||||
unsigned short QCC_CRC_Value(unsigned short crcvalue)
|
||||
|
|
Loading…
Reference in a new issue