diff --git a/engine/Makefile b/engine/Makefile index 98debfa33..ed25105d2 100644 --- a/engine/Makefile +++ b/engine/Makefile @@ -572,6 +572,10 @@ GLQUAKE_OBJS = \ $(VKQUAKE_OBJS) D3DQUAKE_OBJS = \ + d3d8_backend.o \ + d3d8_image.o \ + d3d8_shader.o \ + vid_d3d8.o \ d3d_backend.o \ d3d_image.o \ d3d_shader.o \ diff --git a/engine/client/merged.h b/engine/client/merged.h index ea36050e1..ddd2c4a3b 100644 --- a/engine/client/merged.h +++ b/engine/client/merged.h @@ -344,7 +344,7 @@ typedef union vboarray_s void *addr; } gl; #endif -#if defined(D3D9QUAKE) || defined(D3D11QUAKE) +#if defined(D3D8QUAKE) || defined(D3D9QUAKE) || defined(D3D11QUAKE) struct { void *buff; diff --git a/engine/client/snd_wasapi.c b/engine/client/snd_wasapi.c index 739240d11..0b0cc4869 100644 --- a/engine/client/snd_wasapi.c +++ b/engine/client/snd_wasapi.c @@ -1,6 +1,12 @@ #include "quakedef.h" #if defined(AVAIL_WASAPI) && !defined(SERVERONLY) +//wasapi is nice in that you can use it to bypass the windows audio mixer. hurrah for exclusive audio. +//this should give slightly lower latency audio. +//its otherwise not that interesting. + +//side note: wasapi does provide proper notifications for when a sound device is enabled/disabled, which is useful even if you're using directsound instead. +//this means that we can finally restart the audio if someone plugs in a headset. #include "winquake.h" #include diff --git a/engine/d3d/d3d8_backend.c b/engine/d3d/d3d8_backend.c index b94ccd889..808a09e50 100644 --- a/engine/d3d/d3d8_backend.c +++ b/engine/d3d/d3d8_backend.c @@ -415,6 +415,7 @@ void D3D8BE_Reset(qboolean before) int i; if (before) { + IDirect3DDevice8_SetVertexShader(pD3DDev8, 0); IDirect3DDevice8_SetStreamSource(pD3DDev8, 0, NULL, 0); IDirect3DDevice8_SetIndices(pD3DDev8, NULL, 0); @@ -1482,8 +1483,8 @@ static qboolean BE_DrawMeshChain_SetupPass(shaderpass_t *pass, unsigned int vert /*all meshes in a chain must have the same features*/ vdec = D3DFVF_QVBO; - *vertfirst = shaderstate.dynvbo_offs/sizeof(*map); allocvertexbuffer(shaderstate.dynvbo_buff, shaderstate.dynvbo_size, &shaderstate.dynvbo_offs, &map, vertcount*sizeof(*map)); + *vertfirst = (shaderstate.dynvbo_offs - vertcount*sizeof(*map))/sizeof(*map); for (mno = 0; mno < shaderstate.nummeshes; mno++) @@ -1518,7 +1519,6 @@ static qboolean BE_DrawMeshChain_SetupPass(shaderpass_t *pass, unsigned int vert d3dcheck(IDirect3DDevice8_SetStreamSource(pD3DDev8, 0, shaderstate.dynvbo_buff, sizeof(vbovdata_t))); d3dcheck(IDirect3DDevice8_SetIndices(pD3DDev8, shaderstate.dynidx_buff, *vertfirst)); //base vertex is considered part of ebo state in d3d8, I guess -// *vertfirst = 0; /*we only use one colour, generated from the first pass*/ //vdec |= BE_GenerateColourMods(vertcount, pass); diff --git a/engine/d3d/vid_d3d8.c b/engine/d3d/vid_d3d8.c index 431aceea0..86dbafb54 100644 --- a/engine/d3d/vid_d3d8.c +++ b/engine/d3d/vid_d3d8.c @@ -796,7 +796,7 @@ static qboolean D3D8_VID_Init(rendererstate_t *info, unsigned char *palette) mouseactive = false; } - D3D8BE_Reset(false); +// D3D8BE_Reset(false); //FIXME: old hardware is not guarenteed to support hardware cursors. //this should not be a problem on dx9+ hardware, but might on earlier stuff.