FTEQW
Documentation of the FTE engine source tree.
merged.h
Go to the documentation of this file.
1#ifndef MERGED_H
2#define MERGED_H
3
4#ifdef VKQUAKE
5//we need some types available elsewhere, but don't really want to have to include the entire vulkan api everywhere.
6//unfortunately, vulkan's handle types are not well defined.
7#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
8#define VulkanAPIRandomness void*
9#elif defined(_MSC_VER) && _MSC_VER < 1300
10#define VulkanAPIRandomness __int64
11#else
12#define VulkanAPIRandomness long long
13#endif
14#define qVkDescriptorSet VulkanAPIRandomness
15#define qVkShaderModule VulkanAPIRandomness
16#define qVkPipelineLayout VulkanAPIRandomness
17#define qVkDescriptorSetLayout VulkanAPIRandomness
18#define qVkBuffer VulkanAPIRandomness
19#define qVkDeviceMemory VulkanAPIRandomness
20#endif
21
22//These are defined later in the source tree. This file should probably be moved to a later spot.
23struct pubprogfuncs_s;
24struct globalvars_s;
25struct texture_s;
26struct texnums_s;
27struct vbo_s;
28struct mesh_s;
29struct batch_s;
30struct entity_s;
31struct dlight_s;
32struct galiasbone_s;
33struct dlight_s;
34struct font_s;
35
36typedef enum
37{
38 SKEL_RELATIVE, //relative to parent.
39 SKEL_ABSOLUTE, //relative to model. doesn't blend very well.
40 SKEL_INVERSE_RELATIVE, //pre-inverted. faster than regular relative but has weirdness with skeletal objects. blends okay.
41 SKEL_INVERSE_ABSOLUTE, //final renderable type.
43 SKEL_QUATS //quat+org, 7 floats rather than 12. better lerping.
45
46#ifdef HALFLIFEMODELS
47 #define MAX_BONE_CONTROLLERS 5
48#endif
49
50#ifdef HAVE_LEGACY
51#define FRAME_BLENDS 4 //for compat with DP (for mods that want 4-way blending yet refuse to use framegroups properly). real mods should be using skeletal objects allowing for N-way blending.
52#else
53#define FRAME_BLENDS 2
54#endif
55
56#define FST_BASE 0 //base frames
57#define FS_REG 1 //regular frames
58#define FS_COUNT 2 //regular frames
59typedef struct framestate_s {
61 int frame[FRAME_BLENDS];
62 float frametime[FRAME_BLENDS];
63 float lerpweight[FRAME_BLENDS];
64
65#ifdef HALFLIFEMODELS
66 float subblendfrac; //hl models are weird
67 float subblend2frac; //very weird.
68#endif
69
71 } g[FS_COUNT];
72
73#ifdef SKELETALOBJECTS
74 float *bonestate;
77#endif
78
79#ifdef HALFLIFEMODELS
80 float bonecontrols[MAX_BONE_CONTROLLERS]; //hl special bone controllers
81#endif
83#define NULLFRAMESTATE (framestate_t*)NULL
84
85
86
87
88//function prototypes
89
90#if defined(SERVERONLY)
91#define qrenderer QR_NONE
92#define FNC(n) (n) //FNC is defined as 'pointer if client build, direct if dedicated server'
93
94#else
95#define FNC(n) (*n)
97extern char *q_renderername;
98
99apic_t *R2D_LoadAtlasedPic(const char *name);
100void R2D_ImageAtlas(float x, float y, float w, float h, float s1, float t1, float s2, float t2, apic_t *pic);
101#define R2D_ScalePicAtlas(x,y,w,h,p) R2D_ImageAtlas(x,y,w,h,0,0,1,1,p)
102
103mpic_t *R2D_SafeCachePic (const char *path);
104mpic_t *R2D_SafePicFromWad (const char *name);
105void R2D_DrawCrosshair (void);
106void R2D_ScalePic (float x, float y, float width, float height, mpic_t *pic);
107void R2D_SubPic(float x, float y, float width, float height, mpic_t *pic, float srcx, float srcy, float srcwidth, float srcheight);
108void R2D_TransPicTranslate (float x, float y, int width, int height, qbyte *pic, unsigned int *palette);
109void R2D_TileClear (float x, float y, float w, float h);
110void R2D_FadeScreen (void);
111
112void R2D_Font_Changed(void);
113void R2D_ConsoleBackground (int firstline, int lastline, qboolean forceopaque);
114void R2D_EditorBackground (void);
116
117void R2D_Image(float x, float y, float w, float h, float s1, float t1, float s2, float t2, mpic_t *pic);
118void R2D_Image2dQuad(vec2_t const*points, vec2_t const*texcoords, vec4_t const*rgba, mpic_t *pic);
119
120void R2D_ImageColours(float r, float g, float b, float a);
121void R2D_ImagePaletteColour(unsigned int i, float a);
122void R2D_FillBlock(float x, float y, float w, float h);
123void R2D_Line(float x1, float y1, float x2, float y2, mpic_t *pic);
124extern void (*R2D_Flush)(void);
125
126extern void (*Draw_Init) (void);
127
128extern void (*R_Init) (void);
129extern void (*R_DeInit) (void);
130extern void (*R_RenderView) (void); // must set r_refdef first
131
132extern qboolean (*VID_Init) (rendererstate_t *info, unsigned char *palette);
133extern void (*VID_DeInit) (void);
134extern char *(*VID_GetRGBInfo) (int *stride, int *truevidwidth, int *truevidheight, enum uploadfmt *fmt); //if stride is negative, then the return value points to the last line intead of the first. this allows it to be freed normally.
135extern void (*VID_SetWindowCaption) (const char *msg);
136
137extern void *SCR_ScreenShot_Capture (int fbwidth, int fbheight, int *stride, enum uploadfmt *fmt, qboolean no2d, qboolean hdr);
138extern void SCR_Init (void);
139extern void SCR_DeInit (void);
140extern qboolean (*SCR_UpdateScreen) (void);
141extern void SCR_BeginLoadingPlaque (void);
142extern void SCR_EndLoadingPlaque (void);
143extern void SCR_DrawConsole (qboolean noback);
144extern void SCR_SetUpToDrawConsole (void);
145extern void SCR_CenterPrint (int pnum, const char *str, qboolean skipgamecode);
146
147int R_DrawTextField(int x, int y, int w, int h, const char *text, unsigned int defaultmask, unsigned int fieldflags, struct font_s *font, vec2_t fontscale);
148#define CPRINT_LALIGN (1<<0) //L
149#define CPRINT_TALIGN (1<<1) //T
150#define CPRINT_RALIGN (1<<2) //R
151#define CPRINT_BALIGN (1<<3) //B
152#define CPRINT_BACKGROUND (1<<4) //P
153#define CPRINT_NOWRAP (1<<5)
154
155#define CPRINT_OBITUARTY (1<<16) //O (show at 2/3rds from top)
156#define CPRINT_PERSIST (1<<17) //P (doesn't time out)
157#define CPRINT_TYPEWRITER (1<<18) // (char at a time)
158#define CPRINT_CURSOR (1<<19) //C (use a mouse cursor, also enabled by the presence of a (auto) link)
159
160#endif
161
162//mod_purge flags
164{
165 MP_MAPCHANGED, //new map. old stuff no longer needed, can skip stuff if it'll be expensive.
166 MP_FLUSH, //user flush command. anything flushable goes.
167 MP_RESET //*everything* is destroyed. renderer is going down, or at least nothing depends upon it.
170{
177
178extern struct model_s *mod_known; //for evil people that want to do evil indexing.
179const char *Mod_GetEntitiesString(struct model_s *mod);
180void Mod_SetEntitiesStringLen(struct model_s *mod, const char *str, size_t strsize);
181void Mod_SetEntitiesString(struct model_s *mod, const char *str, qboolean docopy);
182qboolean Mod_LoadEntitiesBlob(struct model_s *mod, const char *entdata, size_t entdatasize); //initial read, with .ent file replacement etc
183void Mod_ParseEntities(struct model_s *mod);
184void Mod_LoadMapArchive(struct model_s *mod, void *archivedata, size_t archivesize);
185extern void Mod_ClearAll (void);
186extern void Mod_Purge (enum mod_purge_e type);
187extern void Mod_SetModifier (const char *modifier);
188extern char mod_modifier[];
189extern qboolean Mod_PurgeModel (struct model_s *mod, enum mod_purge_e ptype);
190extern struct model_s *Mod_FindName (const char *name); //find without loading. needload should be set.
191extern struct model_s *Mod_ForName (const char *name, enum mlverbosity_e verbosity); //finds+loads
192extern struct model_s *Mod_LoadModel (struct model_s *mod, enum mlverbosity_e verbose); //makes sure a model is loaded
193extern void Mod_FileWritten (const char *filename);
194extern void *Mod_Extradata (struct model_s *mod); // handles caching
195extern void Mod_TouchModel (const char *name);
196extern const char *Mod_FixName (const char *modname, const char *worldname); //remaps the name appropriately
197const char *Mod_ParseWorldspawnKey (struct model_s *mod, const char *key, char *buffer, size_t sizeofbuffer);
198
199extern qboolean Mod_GetModelEvent (struct model_s *model, int animation, int eventidx, float *timestamp, int *eventcode, char **eventdata);
200extern int Mod_SkinNumForName (struct model_s *model, int surfaceidx, const char *name);
201extern int Mod_FrameNumForName (struct model_s *model, int surfaceidx, const char *name);
202extern float Mod_GetFrameDuration (struct model_s *model, int surfaceidx, int framenum);
203extern int Mod_GetFrameCount (struct model_s *model);
204
205#undef FNC
206
207extern qboolean Mod_GetTag (struct model_s *model, int tagnum, framestate_t *framestate, float *transforms);
208extern int Mod_TagNumForName (struct model_s *model, const char *name, int firsttag);
209
210void Mod_AddSingleSurface(struct entity_s *ent, int surfaceidx, shader_t *shader, int mode);
211int Mod_GetNumBones(struct model_s *model, qboolean allowtags);
212int Mod_GetBoneRelations(struct model_s *model, int firstbone, int lastbone, framestate_t *fstate, float *result);
213int Mod_GetBoneParent(struct model_s *model, int bonenum);
214struct galiasbone_s *Mod_GetBoneInfo(struct model_s *model, int *numbones);
215const char *Mod_GetBoneName(struct model_s *model, int bonenum);
216
217void Draw_FunString(float x, float y, const void *str);
218void Draw_FunStringU8(unsigned int flags, float x, float y, const void *str);
219void Draw_AltFunString(float x, float y, const void *str);
220void Draw_FunStringWidthFont(struct font_s *font, float x, float y, const void *str, int width, int rightalign, qboolean highlight);
221#define Draw_FunStringWidth(x,y,str,width,rightalign,highlight) Draw_FunStringWidthFont(font_default,x,y,str,width,rightalign,highlight)
222
223extern int r_regsequence;
224
225#ifdef SERVERONLY
226#define Mod_Q1LeafPVS Mod_LeafPVS
227// qbyte *Mod_LeafPVS (struct mleaf_s *leaf, struct model_s *model, qbyte *buffer);
228#endif
229
230enum
231{
237typedef struct image_s
238{
239#ifdef _DEBUG
240 char dbgident[32];
241#endif
242 char *ident; //allocated on end
243 char *subpath; //allocated on end
245 int width; //this is the logical size. the physical size is not considered important (except for render targets, which should not be loaded from disk).
247 int depth;
249 int status; //TEX_
250 unsigned int flags;
251 struct image_s *next;
252// struct image_s *prev;
254 union
255 {
257#if defined(D3DQUAKE) || defined(SWQUAKE)
258 struct
259 {
260 void *ptr; //texture
261 void *ptr2; //view
262 };
263#endif
264#ifdef GLQUAKE
265 int num;
266#endif
267#ifdef VKQUAKE
268 struct
269 {
270 qVkDescriptorSet vkdescriptor;
272 };
273#endif
274 };
275
281
282#if 1
284#define texid_tf texid_t
285#define TEXASSIGN(d,s) d=s
286#define TEXASSIGNF(d,s) d=s
287#define TEXVALID(t) ((t))
288#define TEXLOADED(tex) ((tex) && (tex)->status == TEX_LOADED)
289#define TEXDOWAIT(tex) do{if ((tex) && (tex)->status == TEX_LOADING) COM_WorkerPartialSync((tex), &(tex)->status, TEX_LOADING);}while(0)
290#else
291typedef struct texid_s texid_t[1];
292typedef struct texid_s texid_tf;
293#define TEXASSIGN(d,s) memcpy(&d,&s,sizeof(d))
294#define TEXASSIGNF(d,s) memcpy(&d,&s,sizeof(d))
295#define TEXVALID(t) 1
296#endif
297
298#define Image_LinearFloatFromsRGBFloat(c) (((c) <= 0.04045f) ? (c) * (1.0f / 12.92f) : (float)pow(((c) + 0.055f)*(1.0f/1.055f), 2.4f))
299#define Image_sRGBFloatFromLinearFloat(c) (((c) < 0.0031308f) ? (c) * 12.92f : 1.055f * (float)pow((c), 1.0f/2.4f) - 0.055f)
300
302{
304 {
305 //formats are all w*h*d (where depth has limitations according to type)
306 PTI_2D, //w*h*1 - depth MUST be 1
307 PTI_3D, //w*h*d - we can't generate 3d mips
308 PTI_CUBE, //w*h*6 - depth MUST be 6 (faces must be tightly packed)
309 PTI_2D_ARRAY, //w*h*layers - depth is =layers
310 PTI_CUBE_ARRAY, //w*h*(layers*6) - depth is =(layers*6).
311
312 PTI_ANY //says we don't care.
314
315 uploadfmt_t encoding; //PTI_* formats
316 void *extrafree; //avoids some memcpys
318 struct
319 {
320 void *data;
321 size_t datasize; //ceil(width/blockwidth)*ceil(height/blockheight)*ceil(depth/blockdepth)*blocksize - except that blockdepth is always considered 1 for now.
322 int width;
324 int depth;
326 } mip[72]; //enough for a 4096 cubemap. or a really smegging big 2d texture...
327 //mips are ordered as in arrayindex THEN mip order, allowing easy truncation of mip levels.
328 //cubemaps are just arrayindex*6
329};
330
331//small context for easy vbo creation.
332typedef struct
333{
334 size_t maxsize;
335 size_t pos;
336 int vboid[2];
337 void *vboptr[2];
338 void *fallback;
339} vbobctx_t;
340
341typedef union vboarray_s
342{
343 void *sysptr;
344#ifdef GLQUAKE
345 struct
346 {
347 int vbo;
348 void *addr;
349 } gl;
350#endif
351#if defined(D3D8QUAKE) || defined(D3D9QUAKE) || defined(D3D11QUAKE)
352 struct
353 {
354 void *buff;
355 unsigned int offs;
357#endif
358#ifdef VKQUAKE
359 struct
360 {
361 qVkBuffer buff;
362 unsigned int offs;
363 } vk;
364#endif
365 struct
366 { //matches the biggest version. currently vulkan. this ensures that plugins can allocate model data without caring about renderers.
367 qint64_t buff;
368 unsigned int offs;
371
372//scissor rects
373typedef struct
374{
375 float x;
376 float y;
377 float width;
378 float height;
379 double dmin;
380 double dmax;
381} srect_t;
382
383typedef struct texnums_s {
384 char mapname[MAX_QPATH]; //the 'official' name of the diffusemap. used to generate filenames for other textures.
385 texid_t base; //2d, regular diffuse texture. may have alpha if surface is transparent.
386 texid_t bump; //2d, normalmap. height values packed in alpha.
387 texid_t specular; //2d, specular lighting values. alpha contains exponent multiplier
388 texid_t upperoverlay; //2d, diffuse texture for the upper body(shirt colour). no alpha channel. added to base.rgb. ideally an l8 texture
389 texid_t loweroverlay; //2d, diffuse texture for the lower body(trouser colour). no alpha channel. added to base.rgb. ideally an l8 texture
390 texid_t paletted; //2d, 8bit paletted data, just because. only red is used.
391 texid_t fullbright; //2d, emissive texture. alpha should be 1.
392 texid_t reflectcube; //cube, for fake reflections
393 texid_t reflectmask; //2d, defines how reflective it is (for cubemap reflections)
394 texid_t displacement; //2d, alternative to bump.a, eg R16[F] for offsetmapping or tessellation
395 texid_t occlusion; //2d, occlusion map... only red is used.
396
397 //the material's pushconstants. vulkan guarentees only 128 bytes. so 8 vec4s. note that lmscales should want 4 of them...
398 /*struct
399 {
400 vec4_t basefactors;
401 vec4_t specfactors;
402 vec4_t fullbrightfactors;
403
404 //FIXME: envmap index, lightmap index, etc.
405 } factors;*/
407
408//not all modes accept meshes - STENCIL(intentional) and DEPTHONLY(not implemented)
409typedef enum backendmode_e
410{
411 BEM_STANDARD, //regular mode to draw surfaces akin to q3 (aka: legacy mode). lightmaps+delux+ambient
412 BEM_DEPTHONLY, //just a quick depth pass. textures used only for alpha test (shadowmaps).
413 BEM_WIREFRAME, //for debugging or something
414 BEM_STENCIL, //used for drawing shadow volumes to the stencil buffer.
415 BEM_DEPTHDARK, //a quick depth pass. textures used only for alpha test. additive textures still shown as normal.
416 BEM_CREPUSCULAR, //sky is special, everything else completely black
418 BEM_FOG, //drawing a fog volume
419 BEM_LIGHT, //we have a valid light
421
422typedef struct rendererinfo_s {
424 char *name[5];
426 //FIXME: all but the vid stuff really should be filled in by the video code, simplifying system-specific stuff.
427
428//FIXME: remove these...
431
432 void (*IMG_UpdateFiltering) (image_t *imagelist, int filtermip[3], int filterpic[3], int mipcap[2], float lodbias, float anis);
435
436 void (*R_Init) (void); //FIXME - merge implementations
437 void (*R_DeInit) (void); //FIXME - merge implementations
438 void (*R_RenderView) (void); // must set r_refdef first
439
440//FIXME: keep these...
441 qboolean (*VID_Init) (rendererstate_t *info, unsigned char *palette);
443 void (*VID_SwapBuffers) (void); //force a buffer swap, regardless of what's displayed.
444 qboolean (*VID_ApplyGammaRamps) (unsigned int size, unsigned short *ramps);
445
446 void *(*VID_CreateCursor) (const qbyte *imagedata, int width, int height, uploadfmt_t format, float hotx, float hoty, float scale); //may be null, stub returns null
447 qboolean (*VID_SetCursor) (void *cursor); //may be null
448 void (*VID_DestroyCursor) (void *cursor); //may be null
449
450 void (*VID_SetWindowCaption) (const char *msg);
451
452//FIXME: add clipboard stuff...
453
454//FIXME: remove these...
455 char *(*VID_GetRGBInfo) (int *bytestride, int *truevidwidth, int *truevidheight, enum uploadfmt *fmt);
456
458
459
460 //Select the current render mode and modifier flags
462 /*Draws an entire mesh list from a VBO. vbo can be null, in which case the chain may be drawn without batching.
463 Rules for using a list: Every mesh must be part of the same VBO, shader, lightmap, and must have the same pointers set*/
464 void (*BE_DrawMesh_List)(shader_t *shader, int nummeshes, struct mesh_s **mesh, struct vbo_s *vbo, struct texnums_s *texnums, unsigned int be_flags);
465 void (*BE_DrawMesh_Single)(shader_t *shader, struct mesh_s *meshchain, struct vbo_s *vbo, unsigned int be_flags);
466 void (*BE_SubmitBatch)(struct batch_s *batch);
467 struct batch_s *(*BE_GetTempBatch)(void);
468 //Asks the backend to invoke DrawMeshChain for each surface, and to upload lightmaps as required
469 void (*BE_DrawWorld) (struct batch_s **worldbatches);
470 //called at init, force the display to the right defaults etc
472 //Generates an optimised VBO, one for each texture on the map
474 //Destroys the given vbo
475 void (*BE_ClearVBO)(struct vbo_s *vbo, qboolean dataonly);
476 //Uploads all modified lightmaps
479 qboolean (*BE_SelectDLight)(struct dlight_s *dl, vec3_t colour, vec3_t axis[3], unsigned int lmode);
481 /*check to see if an ent should be drawn for the selected light*/
483 void (*BE_VBO_Begin)(vbobctx_t *ctx, size_t maxsize);
484 void (*BE_VBO_Data)(vbobctx_t *ctx, void *data, size_t size, vboarray_t *varray);
485 void (*BE_VBO_Finish)(vbobctx_t *ctx, void *edata, size_t esize, vboarray_t *earray, void **vbomem, void **ebomem);
486 void (*BE_VBO_Destroy)(vboarray_t *vearray, void *mem);
488
489 char *alignment; //just to make sure that added functions cause compile warnings.
490
491 int (*VID_GetPriority) (void); //so that eg x11 or wayland can be prioritised depending on environment settings. assumed to be 1.
492 void (*VID_EnumerateVideoModes) (const char *driver, const char *output, void (*cb) (int w, int h));
493 qboolean(*VID_EnumerateDevices) (void *usercontext, void(*callback)(void *context, const char *devicename, const char *outputname, const char *desc));
495
496//FIXME: add getdestopres
497//FIXME: add clipboard handling
499
500#define rf currentrendererstate.renderer
501
502#define VID_SwapBuffers rf->VID_SwapBuffers
503#define VID_MayRefresh rf->VID_MayRefresh
504
505#define BE_Init rf->BE_Init
506#define BE_SelectMode rf->BE_SelectMode
507#define BE_GenBrushModelVBO rf->BE_GenBrushModelVBO
508#define BE_ClearVBO rf->BE_ClearVBO
509#define BE_UploadAllLightmaps rf->BE_UploadAllLightmaps
510#define BE_LightCullModel rf->BE_LightCullModel
511#define BE_SelectEntity rf->BE_SelectEntity
512#define BE_SelectDLight rf->BE_SelectDLight
513#define BE_GetTempBatch rf->BE_GetTempBatch
514#define BE_SubmitBatch rf->BE_SubmitBatch
515#define BE_DrawMesh_List rf->BE_DrawMesh_List
516#define BE_DrawMesh_Single rf->BE_DrawMesh_Single
517#define BE_SubmitMeshes rf->BE_SubmitMeshes
518#define BE_DrawWorld rf->BE_DrawWorld
519#define BE_VBO_Begin rf->BE_VBO_Begin
520#define BE_VBO_Data rf->BE_VBO_Data
521#define BE_VBO_Finish rf->BE_VBO_Finish
522#define BE_VBO_Destroy rf->BE_VBO_Destroy
523#define BE_Scissor rf->BE_Scissor
524
525#define BE_RenderToTextureUpdate2d rf->BE_RenderToTextureUpdate2d
526
527#define RT_IMAGEFLAGS (IF_NOMIPMAP|IF_CLAMP|IF_LINEAR|IF_RENDERTARGET)
528texid_t R2D_RT_Configure(const char *id, int width, int height, uploadfmt_t rtfmt, unsigned int imageflags);
529texid_t R2D_RT_GetTexture(const char *id, unsigned int *width, unsigned int *height);
530
531#endif //MERGED_H
qboolean
Definition: api_menu.h:34
vec_t vec3_t[3]
Definition: api_menu.h:40
vec_t vec4_t[4]
Definition: api_menu.h:41
vec_t vec2_t[2]
Definition: api_menu.h:39
unsigned int width
Definition: bymorphed.h:4
unsigned int height
Definition: bymorphed.h:5
enum @13::coninfomode_e mode
Definition: com_phys_ode.c:695
cvar_t model
Definition: cl_main.c:153
cvar_t msg
Definition: cl_main.c:159
void(QDECL *vgui_frame)(void)
entity_t * ent
Definition: com_mesh.c:717
vbo_t vbo
Definition: com_mesh.c:737
void dNearCallback * callback
Definition: com_phys_ode.c:655
dVector3 result
Definition: com_phys_ode.c:519
unsigned char qbyte
Definition: common.h:127
char * text
Definition: decomp.c:375
static int verbosity
Definition: fs_zip.c:16
char filename[64]
Definition: generatebuiltin.c:8
vec3_t * points
Definition: gl_shadow.c:1323
static EGLSurface EGLSurface EGLContext ctx
Definition: gl_videgl.c:47
XRROutputInfo * output
Definition: gl_vidlinuxglx.c:710
struct @319::xidevinfo::@353 axis[2]
unsigned short ramps[3][256]
static GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
Definition: gl_vidnt.c:848
static CONST PIXELFORMATDESCRIPTOR *static int
Definition: gl_vidnt.c:222
static GLuint GLfloat GLfloat GLfloat GLfloat y1
Definition: gl_vidnt.c:848
static GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
Definition: gl_vidnt.c:848
static GLuint GLfloat GLfloat GLfloat x1
Definition: gl_vidnt.c:848
GLdouble GLdouble GLdouble y2
Definition: glquake.h:938
GLfloat GLfloat y
Definition: glquake.h:158
GLint GLenum type
Definition: glquake.h:157
GLint GLenum GLboolean GLsizei stride
Definition: glquake.h:157
GLdouble GLdouble x2
Definition: glquake.h:938
GLuint GLcharARB * name
Definition: glquake.h:155
GLint size
Definition: glquake.h:157
GLfloat x
Definition: glquake.h:158
GLdouble GLdouble r
Definition: glquake.h:969
GLfloat GLfloat GLfloat GLfloat w
Definition: glquake.h:158
GLenum format
Definition: glsupp.h:502
static png_inforp png_colorp * palette
Definition: image.c:1410
iwboolean verbose
Definition: iwebiface.c:329
const char * desc
Definition: m_options.c:1101
void(* R_DeInit)(void)
Definition: renderer.c:1094
texid_t R2D_RT_GetTexture(const char *id, unsigned int *width, unsigned int *height)
Definition: r_2d.c:2012
void * SCR_ScreenShot_Capture(int fbwidth, int fbheight, int *stride, enum uploadfmt *fmt, qboolean no2d, qboolean hdr)
Definition: cl_screen.c:2627
void R2D_Image(float x, float y, float w, float h, float s1, float t1, float s2, float t2, mpic_t *pic)
Definition: r_2d.c:694
struct texid_s texid_tf
Definition: merged.h:292
int Mod_FrameNumForName(struct model_s *model, int surfaceidx, const char *name)
Definition: com_mesh.c:5524
void SCR_Init(void)
Definition: cl_screen.c:3536
void SCR_DrawConsole(qboolean noback)
Definition: cl_screen.c:2529
qboolean R2D_DrawLevelshot(void)
Definition: r_2d.c:1638
void Mod_SetEntitiesString(struct model_s *mod, const char *str, qboolean docopy)
Definition: gl_model.c:399
mod_purge_e
Definition: merged.h:164
@ MP_FLUSH
Definition: merged.h:166
@ MP_MAPCHANGED
Definition: merged.h:165
@ MP_RESET
Definition: merged.h:167
qboolean Mod_GetModelEvent(struct model_s *model, int animation, int eventidx, float *timestamp, int *eventcode, char **eventdata)
Definition: com_mesh.c:5597
struct model_s * Mod_ForName(const char *name, enum mlverbosity_e verbosity)
Definition: gl_model.c:1408
int Mod_GetBoneRelations(struct model_s *model, int firstbone, int lastbone, framestate_t *fstate, float *result)
Definition: com_mesh.c:5138
void(* R_RenderView)(void)
Definition: renderer.c:1095
void SCR_SetUpToDrawConsole(void)
Definition: cl_screen.c:2428
void * Mod_Extradata(struct model_s *mod)
Definition: gl_model.c:783
void R2D_EditorBackground(void)
Definition: r_2d.c:989
const char * Mod_ParseWorldspawnKey(struct model_s *mod, const char *key, char *buffer, size_t sizeofbuffer)
Definition: gl_model.c:2158
qboolean Mod_LoadEntitiesBlob(struct model_s *mod, const char *entdata, size_t entdatasize)
Definition: gl_model.c:2293
void Mod_ClearAll(void)
Definition: gl_model.c:515
void R2D_ImageColours(float r, float g, float b, float a)
Definition: r_2d.c:646
struct galiasbone_s * Mod_GetBoneInfo(struct model_s *model, int *numbones)
Definition: com_mesh.c:5151
void SCR_DeInit(void)
Definition: cl_screen.c:3555
void Mod_LoadMapArchive(struct model_s *mod, void *archivedata, size_t archivesize)
Definition: gl_model.c:490
r_qrenderer_t qrenderer
Definition: renderer.c:1104
void SCR_EndLoadingPlaque(void)
Definition: cl_screen.c:2364
mpic_t * R2D_SafePicFromWad(const char *name)
Definition: r_2d.c:488
void R2D_FadeScreen(void)
Definition: r_2d.c:1631
struct model_s * Mod_LoadModel(struct model_s *mod, enum mlverbosity_e verbose)
Definition: gl_model.c:1357
char mod_modifier[]
Definition: gl_model.c:85
void(* VID_SetWindowCaption)(const char *msg)
Definition: renderer.c:1100
void R2D_ConsoleBackground(int firstline, int lastline, qboolean forceopaque)
Definition: r_2d.c:950
void Mod_ParseEntities(struct model_s *mod)
Definition: gl_model.c:431
qboolean(* SCR_UpdateScreen)(void)
Definition: renderer.c:1102
void Mod_Purge(enum mod_purge_e type)
Definition: gl_model.c:598
void R2D_ImagePaletteColour(unsigned int i, float a)
Definition: r_2d.c:655
union vboarray_s vboarray_t
struct model_s * mod_known
Definition: gl_model.c:83
void Mod_SetModifier(const char *modifier)
Definition: gl_model.c:625
enum backendmode_e backendmode_t
void R2D_DrawCrosshair(void)
Definition: r_2d.c:1910
float Mod_GetFrameDuration(struct model_s *model, int surfaceidx, int framenum)
Definition: com_mesh.c:5863
void R2D_ImageAtlas(float x, float y, float w, float h, float s1, float t1, float s2, float t2, apic_t *pic)
Definition: r_2d.c:666
int R_DrawTextField(int x, int y, int w, int h, const char *text, unsigned int defaultmask, unsigned int fieldflags, struct font_s *font, vec2_t fontscale)
Definition: cl_screen.c:1022
void Mod_AddSingleSurface(struct entity_s *ent, int surfaceidx, shader_t *shader, int mode)
const char * Mod_FixName(const char *modname, const char *worldname)
Definition: gl_model.c:798
int Mod_GetBoneParent(struct model_s *model, int bonenum)
Definition: com_mesh.c:5172
qboolean Mod_GetTag(struct model_s *model, int tagnum, framestate_t *framestate, float *transforms)
Definition: com_mesh.c:5220
void Draw_FunStringU8(unsigned int flags, float x, float y, const void *str)
Definition: sbar.c:208
void Mod_TouchModel(const char *name)
Definition: gl_model.c:899
struct image_s image_t
void(* Draw_Init)(void)
Definition: renderer.c:1090
@ TEX_LOADED
Definition: merged.h:234
@ TEX_LOADING
Definition: merged.h:233
@ TEX_FAILED
Definition: merged.h:235
@ TEX_NOTLOADED
Definition: merged.h:232
void(* R_Init)(void)
Definition: renderer.c:1093
backendmode_e
Definition: merged.h:410
@ BEM_LIGHT
Definition: merged.h:419
@ BEM_DEPTHDARK
Definition: merged.h:415
@ BEM_CREPUSCULAR
Definition: merged.h:416
@ BEM_STANDARD
Definition: merged.h:411
@ BEM_DEPTHONLY
Definition: merged.h:412
@ BEM_STENCIL
Definition: merged.h:414
@ BEM_GBUFFER
Definition: merged.h:417
@ BEM_WIREFRAME
Definition: merged.h:413
@ BEM_FOG
Definition: merged.h:418
void SCR_CenterPrint(int pnum, const char *str, qboolean skipgamecode)
Definition: cl_screen.c:408
image_t * texid_t
Definition: merged.h:283
void R2D_TransPicTranslate(float x, float y, int width, int height, qbyte *pic, unsigned int *palette)
Definition: r_2d.c:907
void Mod_SetEntitiesStringLen(struct model_s *mod, const char *str, size_t strsize)
Definition: gl_model.c:418
skeltype_t
Definition: merged.h:37
@ SKEL_INVERSE_ABSOLUTE
Definition: merged.h:41
@ SKEL_RELATIVE
Definition: merged.h:38
@ SKEL_INVERSE_RELATIVE
Definition: merged.h:40
@ SKEL_IDENTITY
Definition: merged.h:42
@ SKEL_QUATS
Definition: merged.h:43
@ SKEL_ABSOLUTE
Definition: merged.h:39
struct framestate_s framestate_t
void(* VID_DeInit)(void)
Definition: renderer.c:1098
void R2D_TileClear(float x, float y, float w, float h)
Definition: r_2d.c:1004
struct model_s * Mod_FindName(const char *name)
Definition: gl_model.c:831
int Mod_GetNumBones(struct model_s *model, qboolean allowtags)
Definition: com_mesh.c:5113
int Mod_SkinNumForName(struct model_s *model, int surfaceidx, const char *name)
Definition: com_mesh.c:5627
void R2D_SubPic(float x, float y, float width, float height, mpic_t *pic, float srcx, float srcy, float srcwidth, float srcheight)
Definition: r_2d.c:854
const char * Mod_GetBoneName(struct model_s *model, int bonenum)
Definition: com_mesh.c:5196
texid_t R2D_RT_Configure(const char *id, int width, int height, uploadfmt_t rtfmt, unsigned int imageflags)
Definition: r_2d.c:1985
void SCR_BeginLoadingPlaque(void)
Definition: cl_screen.c:2337
mlverbosity_e
Definition: merged.h:170
@ MLV_WARN
Definition: merged.h:173
@ MLV_ERROR
Definition: merged.h:175
@ MLV_SILENT
Definition: merged.h:171
@ MLV_SILENTSYNC
Definition: merged.h:172
@ MLV_WARNSYNC
Definition: merged.h:174
void Draw_FunString(float x, float y, const void *str)
Definition: sbar.c:201
int Mod_TagNumForName(struct model_s *model, const char *name, int firsttag)
Definition: com_mesh.c:5469
void R2D_ScalePic(float x, float y, float width, float height, mpic_t *pic)
Definition: r_2d.c:849
char * q_renderername
Definition: renderer.c:1105
qboolean(* VID_Init)(rendererstate_t *info, unsigned char *palette)
Definition: renderer.c:1097
int r_regsequence
Definition: renderer.c:28
int Mod_GetFrameCount(struct model_s *model)
Definition: com_mesh.c:5900
void R2D_Font_Changed(void)
Definition: r_2d.c:1153
void(* R2D_Flush)(void)
Definition: r_2d.c:82
void R2D_FillBlock(float x, float y, float w, float h)
Definition: r_2d.c:784
void R2D_Image2dQuad(vec2_t const *points, vec2_t const *texcoords, vec4_t const *rgba, mpic_t *pic)
Definition: r_2d.c:741
const char * Mod_GetEntitiesString(struct model_s *mod)
Definition: gl_model.c:346
mpic_t * R2D_SafeCachePic(const char *path)
Definition: r_2d.c:478
struct rendererinfo_s rendererinfo_t
qboolean Mod_PurgeModel(struct model_s *mod, enum mod_purge_e ptype)
Definition: gl_model.c:524
void R2D_Line(float x1, float y1, float x2, float y2, mpic_t *pic)
void Mod_FileWritten(const char *filename)
Definition: gl_model.c:813
void Draw_FunStringWidthFont(struct font_s *font, float x, float y, const void *str, int width, int rightalign, qboolean highlight)
Definition: sbar.c:225
struct texnums_s texnums_t
apic_t * R2D_LoadAtlasedPic(const char *name)
Definition: r_2d.c:497
void Draw_AltFunString(float x, float y, const void *str)
Definition: sbar.c:216
char ** data
Definition: p_script.c:63
int b
Definition: pr_lua.c:242
float scale
Definition: pr_menu.c:106
struct font_s * font[FONT_SIZES]
Definition: pr_menu.c:111
shader_t * shader
Definition: r_2d.c:51
uploadfmt_t fmt
Definition: r_2d.c:48
texid_t tex
Definition: r_2d.c:52
imageflags
Definition: render.h:435
enum uploadfmt uploadfmt_t
uploadfmt
Definition: screen.h:96
static ALC_API ALCvoid * buffer
Definition: snd_al.c:259
int i
Definition: snd_ov.c:50
Definition: wad.h:55
Definition: gl_model.h:133
Definition: client.h:315
Definition: render.h:99
Definition: merged.h:60
int frame[FRAME_BLENDS]
Definition: merged.h:61
float frametime[FRAME_BLENDS]
Definition: merged.h:62
int endbone
Definition: merged.h:70
float subblend2frac
Definition: merged.h:67
float subblendfrac
Definition: merged.h:66
float lerpweight[FRAME_BLENDS]
Definition: merged.h:63
Definition: merged.h:59
skeltype_t skeltype
Definition: merged.h:76
int bonecount
Definition: merged.h:75
struct framestate_s::framestateregion_s g[FS_COUNT]
float bonecontrols[MAX_BONE_CONTROLLERS]
Definition: merged.h:80
float * bonestate
Definition: merged.h:74
Definition: com_mesh.h:77
Definition: progdefs.h:24
Definition: merged.h:238
char dbgident[32]
Definition: merged.h:240
int fallbackwidth
Definition: merged.h:277
unsigned int flags
Definition: merged.h:250
int status
Definition: merged.h:249
int regsequence
Definition: merged.h:244
int num
Definition: merged.h:265
void * ptr2
Definition: merged.h:261
int fallbackheight
Definition: merged.h:278
uploadfmt_t format
Definition: merged.h:248
int depth
Definition: merged.h:247
void * fallbackdata
Definition: merged.h:276
uploadfmt_t fallbackfmt
Definition: merged.h:279
qVkDescriptorSet vkdescriptor
Definition: merged.h:270
int height
Definition: merged.h:246
char * subpath
Definition: merged.h:243
int nosyntaxerror
Definition: merged.h:256
int width
Definition: merged.h:245
struct image_s * next
Definition: merged.h:251
char * ident
Definition: merged.h:242
void * ptr
Definition: merged.h:260
struct vk_image_s * vkimage
Definition: merged.h:271
struct image_s * aliasof
Definition: merged.h:253
Definition: gl_model.h:90
Definition: gl_model.h:972
Definition: merged.h:302
int height
Definition: merged.h:323
int width
Definition: merged.h:322
enum pendingtextureinfo::imgtype_e type
uploadfmt_t encoding
Definition: merged.h:315
qboolean needfree
Definition: merged.h:325
struct pendingtextureinfo::@83 mip[72]
imgtype_e
Definition: merged.h:304
@ PTI_2D
Definition: merged.h:306
@ PTI_ANY
Definition: merged.h:312
@ PTI_CUBE
Definition: merged.h:308
@ PTI_CUBE_ARRAY
Definition: merged.h:310
@ PTI_3D
Definition: merged.h:307
@ PTI_2D_ARRAY
Definition: merged.h:309
size_t datasize
Definition: merged.h:321
void * data
Definition: merged.h:320
int mipcount
Definition: merged.h:317
void * extrafree
Definition: merged.h:316
int depth
Definition: merged.h:324
Definition: progslib.h:121
Definition: merged.h:422
void(* Draw_Shutdown)(void)
Definition: merged.h:430
void(* Draw_Init)(void)
Definition: merged.h:429
void(* BE_Scissor)(srect_t *rect)
Definition: merged.h:480
void(* IMG_UpdateFiltering)(image_t *imagelist, int filtermip[3], int filterpic[3], int mipcap[2], float lodbias, float anis)
Definition: merged.h:432
void(* BE_ClearVBO)(struct vbo_s *vbo, qboolean dataonly)
Definition: merged.h:475
qboolean(* VID_SetCursor)(void *cursor)
Definition: merged.h:447
r_qrenderer_t rtype
Definition: merged.h:425
void(* BE_DrawMesh_Single)(shader_t *shader, struct mesh_s *meshchain, struct vbo_s *vbo, unsigned int be_flags)
Definition: merged.h:465
void(* BE_DrawMesh_List)(shader_t *shader, int nummeshes, struct mesh_s **mesh, struct vbo_s *vbo, struct texnums_s *texnums, unsigned int be_flags)
Definition: merged.h:464
void(* R_Init)(void)
Definition: merged.h:436
void(* BE_SelectEntity)(struct entity_s *ent)
Definition: merged.h:478
void(* IMG_DestroyTexture)(texid_t tex)
Definition: merged.h:434
char * alignment
Definition: merged.h:489
void(* VID_DestroyCursor)(void *cursor)
Definition: merged.h:448
void(* R_RenderView)(void)
Definition: merged.h:438
void(* BE_DrawWorld)(struct batch_s **worldbatches)
Definition: merged.h:469
void(* BE_VBO_Destroy)(vboarray_t *vearray, void *mem)
Definition: merged.h:486
void(* VID_SetWindowCaption)(const char *msg)
Definition: merged.h:450
qboolean(* VID_Init)(rendererstate_t *info, unsigned char *palette)
Definition: merged.h:441
void(* BE_SubmitBatch)(struct batch_s *batch)
Definition: merged.h:466
void(* BE_Init)(void)
Definition: merged.h:471
qboolean(* IMG_LoadTextureMips)(texid_t tex, const struct pendingtextureinfo *mips)
Definition: merged.h:433
void(* BE_VBO_Data)(vbobctx_t *ctx, void *data, size_t size, vboarray_t *varray)
Definition: merged.h:484
void(* BE_VBO_Finish)(vbobctx_t *ctx, void *edata, size_t esize, vboarray_t *earray, void **vbomem, void **ebomem)
Definition: merged.h:485
int(* VID_GetPriority)(void)
Definition: merged.h:491
void(* BE_SelectMode)(backendmode_t mode)
Definition: merged.h:461
qboolean(* BE_LightCullModel)(vec3_t org, struct model_s *model)
Definition: merged.h:482
qboolean(* VID_MayRefresh)(void)
Definition: merged.h:494
void(* BE_GenBrushModelVBO)(struct model_s *mod)
Definition: merged.h:473
void(* BE_VBO_Begin)(vbobctx_t *ctx, size_t maxsize)
Definition: merged.h:483
void(* R_DeInit)(void)
Definition: merged.h:437
qboolean(* BE_SelectDLight)(struct dlight_s *dl, vec3_t colour, vec3_t axis[3], unsigned int lmode)
Definition: merged.h:479
void(* VID_DeInit)(void)
Definition: merged.h:442
void(* VID_SwapBuffers)(void)
Definition: merged.h:443
void(* BE_UploadAllLightmaps)(void)
Definition: merged.h:477
qboolean(* VID_EnumerateDevices)(void *usercontext, void(*callback)(void *context, const char *devicename, const char *outputname, const char *desc))
Definition: merged.h:493
char * description
Definition: merged.h:423
qboolean(* VID_ApplyGammaRamps)(unsigned int size, unsigned short *ramps)
Definition: merged.h:444
void(* VID_EnumerateVideoModes)(const char *driver, const char *output, void(*cb)(int w, int h))
Definition: merged.h:492
void(* BE_RenderToTextureUpdate2d)(qboolean destchanged)
Definition: merged.h:487
qboolean(* SCR_UpdateScreen)(void)
Definition: merged.h:457
Definition: vid.h:42
Definition: shader.h:602
Definition: merged.h:374
float x
Definition: merged.h:375
float y
Definition: merged.h:376
float width
Definition: merged.h:377
double dmax
Definition: merged.h:380
float height
Definition: merged.h:378
double dmin
Definition: merged.h:379
Definition: merged.h:383
texid_t loweroverlay
Definition: merged.h:389
texid_t bump
Definition: merged.h:386
texid_t occlusion
Definition: merged.h:395
texid_t specular
Definition: merged.h:387
texid_t paletted
Definition: merged.h:390
char mapname[MAX_QPATH]
Definition: merged.h:384
texid_t reflectmask
Definition: merged.h:393
texid_t upperoverlay
Definition: merged.h:388
texid_t fullbright
Definition: merged.h:391
texid_t base
Definition: merged.h:385
texid_t displacement
Definition: merged.h:394
texid_t reflectcube
Definition: merged.h:392
Definition: gl_model.h:365
Definition: gl_model.h:320
Definition: merged.h:333
void * fallback
Definition: merged.h:338
size_t pos
Definition: merged.h:335
size_t maxsize
Definition: merged.h:334
Definition: vkrenderer.h:215
netadr_t a
Definition: sv_master.c:141
Definition: merged.h:342
int vbo
Definition: merged.h:347
struct vboarray_s::@85 d3d
void * sysptr
Definition: merged.h:343
struct vboarray_s::@87 vk
struct vboarray_s::@88 pad
struct vboarray_s::@84 gl
void * addr
Definition: merged.h:348
qint64_t buff
Definition: merged.h:367
unsigned int offs
Definition: merged.h:355
qVkBuffer buff
Definition: merged.h:361
void * buff
Definition: merged.h:354
unsigned int flags
Definition: valid.c:313
r_qrenderer_t
Definition: vid.h:29