mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 13:50:53 +00:00
b9cd6ec91b
_pext_vrinputs: added cvar to enable vr inputs protocol extension allowing vr inputs to be networked to ssqc too. defaults to 0 for now, will be renamed when deemed final. updates menu: the prompt to enable sources is now more explicit instead of expecting the user to have a clue. updates menu: added a v3 sources format, which should be more maintainable. not final. updates menu: try to give reasons why sources might be failing (to help blame ISPs if they try fucking over TTH dns again). presets menu: no longer closes the instant a preset is chosen. some presets have a couple of modifiers listed. force the demo loop in the background to serve as a preview. prompts menus: now does word wrapping. ftemaster: support importing server lists from other master servers (requested by Eukara). server: try to detect when non-reply inbound packets are blocked by firewalls/nats/etc (using ftemaster to do so). qcvm: added pointcontentsmask builtin, allowing it to probe more than just world, with fte's full contentbit range instead of just q1 legacy. qcvm: memfill8 builtin now works on createbuffer() pointers. qcvm: add missing unsigned ops. Fixed double comparison ops. fixed bug with op_store_i64. added missing OP_LOADP_I64 qcc: added '#pragma framerate RATE' for overriding implicit nextthink durations. qcc: fixed '#pragma DONT_COMPILE_THIS_FILE' to not screw up comments. qcc: added __GITURL__ __GITHASH__ __GITDATE__ __GITDATETIME__ __GITDESC__ for any mods that might want to make use of that. qcc: fix up -Fhashonly a little setrenderer: support for vulkan gpu enumeration. rulesets: reworked to support custom rulesets (using hashes to catch haxxors, though still nothing prevents just changing the client to ignore rulesets) bspx: use our BIH code for the bspx BRUSHLIST lump instead of the older less efficient code. (static)iqm+obj: these model formats can now be used for the worldmodel (with a suitable .ent file). Also using BIH for much better collision performance. pmove: tried to optimise PM_NudgePosition, should boost fps in stress tests. wayland: fix a crash on startup. mousegrabs now works better. imagetool: uses sdl for previews. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5813 fc73d0e0-1445-4013-8a0c-d673dee63da5
80 lines
2 KiB
C
80 lines
2 KiB
C
#include "merged.h"
|
|
typedef struct vrsetup_s
|
|
{
|
|
//engine-set
|
|
size_t structsize;
|
|
enum
|
|
{
|
|
VR_HEADLESS, //not to be confused with decapitation
|
|
VR_EGL,
|
|
VR_X11_GLX,
|
|
// VR_ANDROID_EGL,
|
|
VR_WIN_WGL,
|
|
VR_VULKAN, //vulkan has no platform variation
|
|
VR_D3D11, //d3d11 only works on windows, so no platform variation
|
|
} vrplatform; //the type of renderer/args getting inited. abort if unknown.
|
|
void *userctx; //for use in callbacks.
|
|
qboolean (*createinstance)(struct vrsetup_s *, char *instanceextensions, void *result); //used by vulkan, can be null for other renderers
|
|
|
|
//vr-set (by preinit)
|
|
struct
|
|
{
|
|
int major, minor;
|
|
} minver, maxver;
|
|
unsigned int deviceid[2];
|
|
char *deviceextensions;
|
|
|
|
|
|
//engine-set (for full init)
|
|
//this stuff is intentionally at the end
|
|
union {
|
|
struct
|
|
{
|
|
void *display;
|
|
int visualid;
|
|
void *glxfbconfig;
|
|
unsigned long drawable; //really int32
|
|
void *glxcontext;
|
|
} x11_glx;
|
|
|
|
struct
|
|
{
|
|
void *(*getprocaddr)(const char *name);
|
|
void *egldisplay;
|
|
void *eglconfig;
|
|
void *eglcontext;
|
|
} egl;
|
|
|
|
struct
|
|
{
|
|
void *hdc;
|
|
void *hglrc;
|
|
} wgl;
|
|
|
|
struct
|
|
{
|
|
void *device;
|
|
} d3d;
|
|
|
|
struct
|
|
{ //these are ALWAYS pointers in vulkan (annoyingly unlike many of its typedefs).
|
|
void *instance;
|
|
void *physicaldevice;
|
|
void *device;
|
|
unsigned int queuefamily;
|
|
unsigned int queueindex;
|
|
} vk;
|
|
};
|
|
} vrsetup_t;
|
|
|
|
//interface registered by plugins for VR stuff.
|
|
typedef struct plugvrfuncs_s
|
|
{
|
|
const char *description;
|
|
qboolean (*Prepare) (vrsetup_t *setupinfo); //called before graphics context init
|
|
qboolean (*Init) (vrsetup_t *setupinfo, rendererstate_t *info); //called after graphics context init
|
|
qboolean (*SyncFrame)(double *frametime); //called in the client's main loop, to block/tweak frame times. True means the game should render as fast as possible.
|
|
qboolean (*Render) (void(*rendereye)(texid_t tex, vec4_t fovoverride, matrix3x4 axisorg));
|
|
void (*Shutdown) (void);
|
|
#define plugvrfuncs_name "VR"
|
|
} plugvrfuncs_t;
|