1
0
Fork 0
forked from fte/fteqw

small fixups for the d3d8 renderer, to give eukara the conflicts that he asked for. disabled by default, because I cba to deal with the dxsdk headers.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5075 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2017-03-21 17:35:27 +00:00
parent afa9fce336
commit f80cafc6fa
5 changed files with 14 additions and 4 deletions

View file

@ -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 \

View file

@ -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;

View file

@ -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 <audioclient.h>

View file

@ -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);

View file

@ -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.