FTEQW
Documentation of the FTE engine source tree.
gl_model.h
Go to the documentation of this file.
1/*
2Copyright (C) 1996-1997 Id Software, Inc.
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19*/
20
21#ifndef __MODEL__
22#define __MODEL__
23
24#include "../client/modelgen.h"
25#include "../client/spritegn.h"
26
27struct hull_s;
28struct trace_s;
29struct wedict_s;
30struct model_s;
31struct world_s;
32struct dlight_s;
33typedef struct builddata_s builddata_t;
34typedef struct bspx_header_s bspx_header_t;
35
36typedef enum {
43 //fixme: occlusion tests
46 //then rtlights are drawn
53
54
57
58#ifdef FTE_TARGET_WEB
59#define MAX_BONES 256
60#elif defined(IQMTOOL)
61#define MAX_BONES 8192
62#else
63#define MAX_BONES 256 //Note: there's lots of bone data allocated on the stack, so don't bump recklessly.
64#endif
65#if MAX_BONES>65536
66#define GL_BONE_INDEX_TYPE GL_UNSIGNED_INT
67typedef unsigned int boneidx_t;
68#elif MAX_BONES>256
69#define GL_BONE_INDEX_TYPE GL_UNSIGNED_SHORT
70typedef unsigned short boneidx_t;
71#else
72#define GL_BONE_INDEX_TYPE GL_UNSIGNED_BYTE
73typedef unsigned char boneidx_t;
74#endif
76
77struct doll_s;
78void rag_uninstanciateall(void);
79void rag_flushdolls(qboolean force);
80void rag_freedoll(struct doll_s *doll);
81struct doll_s *rag_createdollfromstring(struct model_s *mod, const char *fname, int numbones, const char *file);
82struct world_s;
83void rag_doallanimations(struct world_s *world);
86void rag_lerpdeltaent(lerpents_t *le, unsigned int bonecount, short *newstate, float frac, short *oldstate);
87void skel_reset(struct world_s *world);
88
89typedef struct mesh_s
90{
93
94 /*position within its vbo*/
95 unsigned int vbofirstvert;
96 unsigned int vbofirstelement;
97
98 /*
99 FIXME: move most of this stuff out into a vbo struct
100 */
101
102 float xyz_blendw[2];
103
104 /*arrays used for rendering*/
105 vecV_t *xyz_array;
106 vecV_t *xyz2_array;
107 vec3_t *normals_array; /*required for lighting*/
108 vec3_t *snormals_array;/*required for rtlighting*/
109 vec3_t *tnormals_array;/*required for rtlighting*/
110 vec2_t *st_array; /*texture coords*/
111 vec2_t *lmst_array[MAXRLIGHTMAPS]; /*second texturecoord set (merely dubbed lightmap, one for each potential lightstyle)*/
112 avec4_t *colors4f_array[MAXRLIGHTMAPS];/*floating point colours array*/
113 byte_vec4_t *colors4b_array;/*byte colours array*/
114
116
117 //required for shadow volumes
120
121 qboolean istrifan; /*if its a fan/poly/single quad (permits optimisations)*/
122 const float *bones;
127
128/*
129batches are generated for each shader/ent as required.
130once a batch is known to the backend for that frame, its shader, vbo, ent, lightmap, textures may not be changed until the frame has finished rendering. This is to potentially permit caching.
131*/
132typedef struct batch_s
133{
134 mesh_t **mesh; /*list must be long enough for all surfaces that will form part of this batch times two, for mirrors/portals*/
135 struct batch_s *next;
136 unsigned int meshes;
137 unsigned int firstmesh;
138
140 struct vbo_s *vbo;
141 entity_t *ent; /*used for shader properties*/
142 struct mfog_s *fog;
144
145 short lightmap[MAXRLIGHTMAPS]; /*used for shader lightmap textures*/
146 lightstyleindex_t lmlightstyle[MAXRLIGHTMAPS];
147 unsigned char vtlightstyle[MAXRLIGHTMAPS];
148
149 unsigned int maxmeshes; /*not used by backend*/
150 unsigned int flags; /*backend flags (force transparency etc)*/
151 struct texture_s *texture; /*is this used by the backend?*/
153
155#if R_MAX_RECURSE > 2
156 unsigned int recursefirst[R_MAX_RECURSE-2]; //fixme: should thih, firstmesh, and meshes be made ushorts?
157#endif
158 /*caller-use, not interpreted by backend*/
159 union
160 {
161 struct
162 {
163 unsigned int ebobatch; //temporal scene cache stuff, basically just a simple index so we don't have to deal with shader sort values when generating new index lists.
164 unsigned int shadowbatch; //a unique index to accelerate shadowmesh generation (dlights, yay!)
165// } bmodel;
166// struct
167// {
168 vec4_t plane; /*used only at load (for portal surfaces, so multiple planes are not part of the same batch)*/
169 } bmodel; //bmodel surfaces.
170 struct
171 {
172 unsigned int lightidx;
173 unsigned int lightmode;
174 } dlight; //deferred light batches
175 struct
176 {
177 unsigned short surfrefs[sizeof(mesh_t)/sizeof(unsigned short)]; //for hlmdl batching...
179 struct
180 {
181 unsigned int surface;
183 /* struct
184 {
185 unsigned int first;
186 unsigned int count;
187 } surf;*/
188 struct
189 {
190 unsigned int ebobatch; //temporal scene cache stuff, basically just a simple index so we don't have to deal with shader sort values when generating new index lists.
193 };
196/*
197
198d*_t structures are on-disk representations
199m*_t structures are in-memory
200
201*/
202
203// entity effects
204
205#define EF_BRIGHTFIELD (1<<0)
206#define EF_MUZZLEFLASH (1<<1)
207#define EF_BRIGHTLIGHT (1<<2)
208#define EF_DIMLIGHT (1<<3)
209#define QWEF_FLAG1 (1<<4) //only applies to qw player entities
210#define NQEF_NODRAW (1<<4) //so packet entities are free to get this instead
211#define REEF_QUADLIGHT (1<<4)
212#define QWEF_FLAG2 (1<<5) //only applies to qw player entities
213#define NQEF_ADDITIVE (1<<5) //so packet entities are free to get this instead
214#define REEF_PENTLIGHT (1<<5)
215#define EF_BLUE (1<<6)
216#define REEF_CANDLELIGHT (1<<6)
217#define EF_RED (1<<7)
218#define H2EF_NODRAW (1<<7) //this is going to get complicated... emulated server side.
219#define DPEF_NOGUNBOB (1<<8) //viewmodel attachment does not bob. only applies to viewmodelforclient/RF_WEAPONMODEL
220#define EF_FULLBRIGHT (1<<9) //abslight=1
221#define DPEF_FLAME (1<<10) //'onfire'
222#define DPEF_STARDUST (1<<11) //'showering sparks'
223#define EF_NOSHADOW (1<<12) //doesn't cast a shadow
224#define EF_NODEPTHTEST (1<<13) //shows through walls.
225#define DPEF_SELECTABLE_ (1<<14) //highlights when prydoncursored
226#define DPEF_DOUBLESIDED_ (1<<15) //disables culling
227#define DPEF_NOSELFSHADOW_ (1<<16) //doesn't cast shadows on any noselfshadow entities.
228#define DPEF_DYNAMICMODELLIGHT_ (1<<17) //forces dynamic lights... I have no idea what this is actually needed for.
229#define EF_GREEN (1<<18)
230#define EF_UNUSED19 (1<<19)
231#define EF_RESTARTANIM_BIT (1<<20) //restarts the anim when toggled between states
232#define EF_TELEPORT_BIT (1<<21) //disable lerping when toggled between states
233#define DPEF_LOWPRECISION (1<<22) //part of the protocol/server, not the client itself.
234#define EF_NOMODELFLAGS (1<<23)
235#define EF_MF_ROCKET (1<<24)
236#define EF_MF_GRENADE (1<<25)
237#define EF_MF_GIB (1<<26)
238#define EF_MF_ROTATE (1<<27)
239#define EF_MF_TRACER (1<<28)
240#define EF_MF_ZOMGIB (1u<<29)
241#define EF_MF_TRACER2 (1u<<30)
242#define EF_MF_TRACER3 (1u<<31)
243
244#define EF_HASPARTICLETRAIL (0xff800000 | EF_BRIGHTFIELD|DPEF_FLAME|DPEF_STARDUST)
245
246/*
247==============================================================================
248
249BRUSH MODELS
250
251==============================================================================
252*/
253
254struct mnode_s;
255
256typedef struct
257{
258 qbyte *buffer; //reallocated if needed.
261typedef enum
262{
264 PVM_MERGE, //merge the pvs bits into the provided buffer
265 PVM_REPLACE,//return value is guarenteed to be the provided buffer.
266} pvsmerge_t;
267
268typedef struct {
269 //model is being purged from memory.
270 void (*PurgeModel) (struct model_s *mod);
271
272 unsigned int (*PointContents) (struct model_s *model, const vec3_t axis[3], const vec3_t p);
273// unsigned int (*BoxContents) (struct model_s *model, int hulloverride, const framestate_t *framestate, const vec3_t axis[3], const vec3_t p, const vec3_t mins, const vec3_t maxs);
274
275 //deals with whatever is native for the bsp (gamecode is expected to distinguish this).
276 qboolean (*NativeTrace) (struct model_s *model, int hulloverride, const framestate_t *framestate, const vec3_t axis[3], const vec3_t p1, const vec3_t p2, const vec3_t mins, const vec3_t maxs, qboolean capsule, unsigned int against, struct trace_s *trace);
277 unsigned int (*NativeContents)(struct model_s *model, int hulloverride, const framestate_t *framestate, const vec3_t axis[3], const vec3_t p, const vec3_t mins, const vec3_t maxs);
278
279 unsigned int (*FatPVS) (struct model_s *model, const vec3_t org, pvsbuffer_t *pvsbuffer, qboolean merge);
280 qboolean (*EdictInFatPVS) (struct model_s *model, const struct pvscache_s *edict, const qbyte *pvs, const int *areas); //areas[0] is the count of accepted areas, if valid.
281 void (*FindTouchedLeafs) (struct model_s *model, struct pvscache_s *ent, const vec3_t cullmins, const vec3_t cullmaxs); //edict system as opposed to q2 game dll system.
282
283 void (*LightPointValues) (struct model_s *model, const vec3_t point, vec3_t res_diffuse, vec3_t res_ambient, vec3_t res_dir);
284 void (*StainNode) (struct model_s *model, float *parms);
285 void (*MarkLights) (struct dlight_s *light, dlightbitmask_t bit, struct mnode_s *node);
286
287 int (*ClusterForPoint) (struct model_s *model, const vec3_t point, int *areaout); //pvs index (leaf-1 for q1bsp). may be negative (ie: no pvs).
288 qbyte *(*ClusterPVS) (struct model_s *model, int cluster, pvsbuffer_t *pvsbuffer, pvsmerge_t merge);
289 qbyte *(*ClusterPHS) (struct model_s *model, int cluster, pvsbuffer_t *pvsbuffer);
290 qbyte *(*ClustersInSphere) (struct model_s *model, const vec3_t point, float radius, pvsbuffer_t *pvsbuffer, const qbyte *fte_restrict unionwith);
291
292 size_t (*WriteAreaBits) (struct model_s *model, qbyte *buffer, size_t maxbytes, int area, qboolean merge); //writes a set of bits valid for a specific viewpoint's area.
293 qboolean (*AreasConnected) (struct model_s *model, unsigned int area1, unsigned int area2); //fails if there's no open doors
294 void (*SetAreaPortalState) (struct model_s *model, unsigned int portal, unsigned int area1, unsigned int area2, qboolean open); //a door moved...
295 size_t (*SaveAreaPortalBlob)(struct model_s *model, void **ptr); //for vid_reload to not break portals. dupe the ptrbefore freeing the model.
296 size_t (*LoadAreaPortalBlob)(struct model_s *model, void *ptr, size_t size); //for vid_reload to not break portals (has refcount info etc).
297
298 void (*PrepareFrame) (struct model_s *model, refdef_t *refdef, int area, int clusters[2], pvsbuffer_t *vis, qbyte **entvis_out, qbyte **surfvis_out);
299 void (*GenerateShadowMesh) (struct model_s *model, dlight_t *dl, const qbyte *lvis, qbyte *truevis, void(*callback)(struct msurface_s*));
300 void (*InfoForPoint) (struct model_s *model, vec3_t pos, int *area, int *cluster, unsigned int *contentbits);
302
303
304
305
306//
307// in memory representation
308//
309// !!! if this is changed, it must be changed in asm_draw.h too !!!
310typedef struct
311{
313} mvertex_t;
314
315#define SIDE_FRONT 0
316#define SIDE_BACK 1
317#define SIDE_ON 2
318
319typedef struct vbo_s
320{
321 unsigned int numvisible;
323
324 unsigned int indexcount;
325 unsigned int vertcount;
326 unsigned int meshcount;
328
330 void *vertdata; /*internal use*/
331
332 int vao;
333 unsigned int vaodynamic; /*mask of the attributes that are dynamic*/
334 unsigned int vaoenabled; /*mask of the attributes *currently* enabled. renderer may change this */
338 vboarray_t lmcoord[MAXRLIGHTMAPS];
339
343
345 vboarray_t colours[MAXRLIGHTMAPS];
346
348
350
351 void *vbomem;
352 void *ebomem;
353
354 unsigned int vbobones;
355 const float *bones;
356 unsigned int numbones;
357
358 struct vbo_s *next;
360void GL_SelectVBO(int vbo);
361void GL_SelectEBO(int vbo);
362void GL_DeselectVAO(void);
363
364typedef struct texture_s
365{
366 char name[128];
367 unsigned vwidth, vheight; //used for lightmap coord generation
368
370 char *partname; //parsed from the worldspawn entity
371
372 unsigned int anim_total; // total tenths in sequence ( 0 = no)
373 unsigned int anim_min, anim_max; // time for this frame min <=time< max
374 struct texture_s *anim_next; // in the animation sequence
375 struct texture_s *alternate_anims; // bmodels in frmae 1 use these
376
378 unsigned int srcwidth, srcheight; //actual size (updated miptex format)
379 qbyte *srcdata; //the different mipmap levels.
380 qbyte *palette; //host_basepal or halflife per-texture palette (or null)
382/*
383typedef struct
384{
385 float coord[3];
386 float texcoord[2];
387 float lmcoord[2];
388
389 float normals[3];
390 float svector[3];
391 float tvector[3];
392} vbovertex_t;
393*/
394#define SURF_DRAWSKYBOX 0x00001
395#define SURF_PLANEBACK 0x00002
396#define SURF_DRAWSKY 0x00004
397#define SURF_DRAWSPRITE 0x00008
398#define SURF_DRAWTURB 0x00010 //water warp effect
399#define SURF_DRAWTILED 0x00020 //no need for a sw surface cache... (read: no lightmap)
400#define SURF_DRAWBACKGROUND 0x00040
401#define SURF_UNDERWATER 0x00080
402#define SURF_DONTWARP 0x00100
403//#define SURF_BULLETEN 0x00200
404#define SURF_NOFLAT 0x08000
405#define SURF_DRAWALPHA 0x10000
406#define SURF_NODRAW 0x20000 //set on non-vertical halflife water submodel surfaces
407
408// !!! if this is changed, it must be changed in asm_draw.h too !!!
409typedef struct
410{
411 unsigned int v[2];
412} medge_t;
413
414typedef struct mtexinfo_s
415{
417 float vecscale[2];
419 int flags;
420
421 //it's a q2 thing.
425
426#define SPECULAR
427#ifdef SPECULAR
428#define VERTEXSIZE 10
429#else
430#define VERTEXSIZE 7
431#endif
432
433typedef struct mfog_s
434{
435 char shadername[MAX_QPATH];
437
439
443
444typedef struct
445{
447 int cubesize; //pixels
448} denvmap_t;
449typedef struct
450{
452 int cubesize; //pixels
453
455} menvmap_t;
456
457#define LMSHIFT_DEFAULT 4
458typedef struct msurface_s
459{
461 int flags;
462
463 int firstedge; // look up in model->surfedges[], negative numbers
464 unsigned short numedges; // are backwards edges
465
466 unsigned short lmshift; //texels>>lmshift = lightmap samples.
468 short extents[2];
469
470 unsigned short light_s[MAXRLIGHTMAPS], light_t[MAXRLIGHTMAPS]; // gl lightmap coordinates
471
475
478 int visframe; // should be drawn when node is crossed
479#ifdef RTLIGHTS
481#endif
482// int clipcount;
483
484// legacy lighting info
485 dlightbitmask_t dlightbits;
487 qboolean cached_dlight; // true if dynamic light in cache
488
489//static lighting
490 int lightmaptexturenums[MAXRLIGHTMAPS]; //rbsp+fbsp formats have multiple lightmaps
491 lightstyleindex_t styles[MAXCPULIGHTMAPS];
492 qbyte vlstyles[MAXRLIGHTMAPS];
493 int cached_light[MAXCPULIGHTMAPS]; // values currently used in lightmap
494 int cached_colour[MAXCPULIGHTMAPS]; // values currently used in lightmap
495#ifndef NOSTAINS
497#endif
498 qbyte *samples; // [numstyles*surfsize]
500
501/*typedef struct mbrush_s
502{
503 struct mbrush_s *next;
504 unsigned int contents;
505 int numplanes;
506 struct mbrushplane_s
507 {
508 vec3_t normal;
509 float dist;
510 } planes[1];
511} mbrush_t;*/
512
513typedef struct mnode_s
514{
515// common with leaf
516 int contents; // 0, to differentiate from leafs
517 int visframe; // node needs to be traversed if current
519
520 float minmaxs[6]; // for bounding box culling
521
523// struct mbrush_s *brushes;
524
525// node specific
527 struct mnode_s *children[2];
528#if defined(Q2BSPS) || defined(Q3BSPS) || defined(MAP_PROC)
529 int childnum[2];
530#endif
531
532 unsigned int firstsurface;
533 unsigned int numsurfaces;
535
536
537
538typedef struct mleaf_s
539{
540// common with node
541 int contents; // wil be a negative contents number
542 int visframe; // node needs to be traversed if current
544
545 float minmaxs[6]; // for bounding box culling
546
548
549// leaf specific
551
555
556#if defined(Q2BSPS) || defined(Q3BSPS)
558 int area;
559 unsigned int firstleafbrush;
560 unsigned int numleafbrushes;
561#endif
562#ifdef Q3BSPS
563 unsigned int firstleafcmesh;
564 unsigned int numleafcmeshes;
565 unsigned int firstleafpatch;
566 unsigned int numleafpatches;
567#endif
569
570
571typedef struct
572{
573 float mins[3], maxs[3];
574 float origin[3];
575 unsigned int headnode[MAX_MAP_HULLSM];
576 unsigned int visleafs; // not including the solid leaf 0
577 unsigned int firstface, numfaces;
578 qboolean hullavailable[MAX_MAP_HULLSM];
579
581 unsigned int numbrushes;
582} mmodel_t;
583
584
585// !!! if this is changed, it must be changed in asm_i386.h too !!!
586typedef struct hull_s
587{
596
597void Q1BSP_CheckHullNodes(hull_t *hull);
598void Q1BSP_SetModelFuncs(struct model_s *mod);
599void Q1BSP_LoadBrushes(struct model_s *model, bspx_header_t *bspx, void *mod_base);
600void Q1BSP_Init(void);
601void Q1BSP_GenerateShadowMesh(struct model_s *model, struct dlight_s *dl, const qbyte *lightvis, qbyte *litvis, void (*callback)(msurface_t *surf));
602
603void BSPX_LightGridLoad(struct model_s *model, bspx_header_t *bspx, qbyte *mod_base); //for q1 or q2 models.
604void BSPX_LoadEnvmaps(struct model_s *mod, bspx_header_t *bspx, void *mod_base);
605void *BSPX_FindLump(bspx_header_t *bspxheader, void *mod_base, char *lumpname, int *lumpsize);
606bspx_header_t *BSPX_Setup(struct model_s *mod, char *filebase, size_t filelen, lump_t *lumps, size_t numlumps);
607
608typedef struct fragmentdecal_s fragmentdecal_t;
609void Fragment_ClipPoly(fragmentdecal_t *dec, int numverts, float *inverts, shader_t *surfshader);
610size_t Fragment_ClipPlaneToBrush(vecV_t *points, size_t maxpoints, void *planes, size_t planestride, size_t numplanes, vec4_t face);
611void Mod_ClipDecal(struct model_s *mod, vec3_t center, vec3_t normal, vec3_t tangent1, vec3_t tangent2, float size, unsigned int surfflagmask, unsigned int surflagmatch, void (*callback)(void *ctx, vec3_t *fte_restrict points, size_t numpoints, shader_t *shader), void *ctx);
612
613void Q1BSP_MarkLights (dlight_t *light, dlightbitmask_t bit, mnode_t *node);
614void GLQ1BSP_LightPointValues(struct model_s *model, const vec3_t point, vec3_t res_diffuse, vec3_t res_ambient, vec3_t res_dir);
615qboolean Q1BSP_RecursiveHullCheck (hull_t *hull, int num, const vec3_t p1, const vec3_t p2, unsigned int hitcontents, struct trace_s *trace);
616
617/*
618==============================================================================
619
620SPRITE MODELS
621
622==============================================================================
623*/
624
625
626// FIXME: shorten these?
627typedef struct mspriteframe_s
628{
629 float up, down, left, right;
635
637
638
639typedef struct
640{
642 float *intervals;
643 mspriteframe_t *frames[1];
645
646typedef struct
647{
651
652typedef struct
653{
654 int type;
658 float beamlength; // remove?
660} msprite_t;
661
662
663/*
664==============================================================================
665
666ALIAS MODELS
667
668Alias models are position independent, so the cache manager can move them.
669==============================================================================
670*/
671#if 0
672typedef struct {
673 int s;
674 int t;
675} mstvert_t;
676
677typedef struct
678{
681 float interval;
684
687
688 int frame;
689 char name[16];
691
692typedef struct
693{
696 int frame;
698
699typedef struct
700{
705
706// !!! if this is changed, it must be changed in asm_draw.h too !!!
707typedef struct mtriangle_s {
708 int xyz_index[3];
709 int st_index[3];
710
711 int pad[2];
713
714
715#define MAX_SKINS 32
716typedef struct {
717 int ident;
730 int flags;
731 float size;
734 int posedata; // numposes*poseverts trivert_t
735
736 int baseposedata; //original verts for triangles to reference
737 int triangles; //we need tri data for shadow volumes
738
739 int commands; // gl command list with embedded s/t
740 int gl_texturenum[MAX_SKINS][4];
741 int texels[MAX_SKINS];
742 maliasframedesc_t frames[1]; // variable sized
743} aliashdr_t;
744
745#define MAXALIASVERTS 2048
746#define ALIAS_Z_CLIP_PLANE 5
747#define MAXALIASFRAMES 256
748#define MAXALIASTRIS 2048
749extern aliashdr_t *pheader;
750extern mstvert_t stverts[MAXALIASVERTS*2];
751extern mtriangle_t triangles[MAXALIASTRIS];
752extern dtrivertx_t *poseverts[MAXALIASFRAMES];
753
754#endif
755
756
757/*
758========================================================================
759
760.MD2 triangle model file format
761
762========================================================================
763*/
764
765// LordHavoc: grabbed this from the Q2 utility source,
766// renamed a things to avoid conflicts
767
768#define MD2IDALIASHEADER "IDP2",4
769#define MD2ALIAS_VERSION 8
770#define MD2MAX_SKINNAME 64 //part of the format
771
772/*
773#define MD2MAX_TRIANGLES 4096
774#define MD2MAX_FRAMES 512
775#define MD2MAX_VERTS 2048
776#define MD2MAX_SKINS 32
777// sanity checking size
778#define MD2MAX_SIZE (1024*4200)
779*/
780typedef struct
781{
782 short s;
783 short t;
785
786typedef struct
787{
788 short index_xyz[3];
789 short index_st[3];
791
792typedef struct
793{
794 qbyte v[3]; // scaled qbyte to fit in frame mins/maxs
797
798/*
799#define MD2TRIVERTX_V0 0
800#define MD2TRIVERTX_V1 1
801#define MD2TRIVERTX_V2 2
802#define MD2TRIVERTX_LNI 3
803#define MD2TRIVERTX_SIZE 4
804*/
805
806typedef struct
807{
808 float scale[3]; // multiply qbyte verts by this
809 float translate[3]; // then add this
810 char name[16]; // frame name from grabbing
811 md2trivertx_t verts[1]; // variable sized
812} md2frame_t;
813
814
815// the glcmd format:
816// a positive integer starts a tristrip command, followed by that many
817// vertex structures.
818// a negative integer starts a trifan command, followed by -x vertexes
819// a zero indicates the end of the command list.
820// a vertex consists of a floating point s, a floating point t,
821// and an integer vertex index.
822
823
824typedef struct
825{
826 int ident;
828
831 int framesize; // qbyte size of each frame
832
835 int num_st; // greater than num_xyz for seams
837 int num_glcmds; // dwords in strip/fan command list
839
840 int ofs_skins; // each skin is a MAX_SKINNAME string
841 int ofs_st; // qbyte offset from start for stverts
842 int ofs_tris; // offset for dtriangles
843 int ofs_frames; // offset for first frame
845 int ofs_end; // end of file
846} md2_t;
847
848//#define ALIASTYPE_MDL 1
849//#define ALIASTYPE_MD2 2
850
851
852
853
854
855//===================================================================
856
857
858typedef struct
859{
860 qbyte ambient[3];
861 qbyte diffuse[3];
864
865typedef struct
866{
867 unsigned char ambient[4][3];
868 unsigned char diffuse[4][3];
869 unsigned char styles[4];
870 unsigned char direction[2];
872
873//q3 based
874typedef struct {
875 int gridBounds[4]; //3 = 0*1
879//rbsp specific
881 unsigned short *rbspindexes;
882//non-rbsp specific
884
885 //the reason rbsp is seperate from the non-rbsp is because it allows better memory compression.
886 //I chose not to expand at loadtime because q3 would suffer from greater cache misses.
888
889
890//
891// Whole model
892//
893
895typedef enum {fg_quake, fg_quake2, fg_quake3, fg_halflife, fg_new, fg_doom, fg_doom3} fromgame_t; //useful when we have very similar model types. (eg quake/halflife bsps)
896typedef enum {sb_none, sb_quake64, sb_long1, sb_long2} subbsp_t; // used to denote bsp specifics for load processing only (no runtime changes)
897
898#define MF_ROCKET (1u<<0) // leave a trail
899#define MF_GRENADE (1u<<1) // leave a trail
900#define MF_GIB (1u<<2) // leave a trail
901#define MF_ROTATE (1u<<3) // rotate (bonus items)
902#define MF_TRACER (1u<<4) // green split trail
903#define MF_ZOMGIB (1u<<5) // small blood trail
904#define MF_TRACER2 (1u<<6) // orange split trail + rotate
905#define MF_TRACER3 (1u<<7) // purple trail
906
907//hexen2 support.
908#define MFH2_FIREBALL (1u<<8) // Yellow transparent trail in all directions
909#define MFH2_ICE (1u<<9) // Blue-white transparent trail, with gravity
910#define MFH2_MIP_MAP (1u<<10) // This model has mip-maps
911#define MFH2_SPIT (1u<<11) // Black transparent trail with negative light
912#define MFH2_TRANSPARENT (1u<<12) // Transparent sprite
913#define MFH2_SPELL (1u<<13) // Vertical spray of particles
914#define MFH2_HOLEY (1u<<14) // Solid model with color 0 cut out
915#define MFH2_SPECIAL_TRANS (1u<<15) // Translucency through the particle table
916#define MFH2_FACE_VIEW (1u<<16) // Poly Model always faces you
917#define MFH2_VORP_MISSILE (1u<<17) // leave a trail at top and bottom of model
918#define MFH2_SET_STAFF (1u<<18) // slowly move up and left/right
919#define MFH2_MAGICMISSILE (1u<<19) // a trickle of blue/white particles with gravity
920#define MFH2_BONESHARD (1u<<20) // a trickle of brown particles with gravity
921#define MFH2_SCARAB (1u<<21) // white transparent particles with little gravity
922#define MFH2_ACIDBALL (1u<<22) // Green drippy acid shit
923#define MFH2_BLOODSHOT (1u<<23) // Blood rain shot trail
924#define MFH2_SPIDERBLOOD (1u<<31) // spider blood (remapped from MF_ROCKET, to avoid dlight issues)
925
926typedef union {
927 struct {
931 } doom;
933
934typedef struct
935{
937 int area[2];
939 float dist;
944} portal_t;
945
947{
948 quint16_t lmsize[2]; //made explicit. beware MAX_
949 quint32_t lmoffset; //replacement offset for vanilla compat.
950 vec4_t lmvecs[2]; //lmcoord[] = dotproduct3(vertexcoord, lmvecs[])+lmvecs[][3]
951};
953{
954 vec4_t lmvecs[2]; //lmcoord[] = dotproduct3(vertexcoord, lmvecs[])+lmvecs[][3]
955 float lmvecscale[2]; //just 1/Length(lmvecs). dlights work in luxels, but need to be able to work back to qu.
956};
957
959 quint32_t n;
960 quint32_t s;
961 quint32_t t;
962};
963
964enum
965{
971typedef struct model_s
972{
973 char name[MAX_QPATH]; //actual name on disk
974 char publicname[MAX_QPATH]; //name that the gamecode etc sees
975 int datasequence; //if it gets old enough, we can purge it.
977 int loadstate; //MLS_
978 qboolean tainted; // differs from the server's version. this model will be invisible as a result, to avoid spiked models.
979 qboolean pushdepth; // bsp submodels have this flag set so you don't get z fighting on co-planar surfaces.
980 time_t mtime; // modification time. so we can flush models if they're changed on disk. or at least worldmodels.
981
982 struct model_s *submodelof; // shares memory allocations with this model.
983
986
989
990 int flags;
994
995//
996// volume occupied by the model graphics
997//
999 float radius;
1001 float maxlod;
1002
1003//
1004// solid volume for clipping
1005//
1008
1009 void *cnodes; //BIH tree
1010//
1011// brush model
1012//
1014
1017
1020
1021 size_t pvsbytes; //total bytes for the per-leaf pvs/phs data. rounded up to sizeof(int).
1022 int numclusters; //number of bits in the pvs data.
1023 int numleafs; // number of visible leafs, not counting 0
1025
1029 struct surfedgenormals_s *surfedgenormals; //for per-vertex normals
1031
1034
1038
1041
1044
1047
1050
1053
1054 hull_t hulls[MAX_MAP_HULLSM];
1055
1058
1059 qbyte *pvs, *phs; // fully expanded and decompressed
1061 void *vis;
1069 unsigned numenvmaps;
1070
1071 struct skytris_s *skytris; //for surface emittance
1072 float skytime; //for surface emittance
1073 struct skytriblock_s *skytrimem;
1074
1075 struct {unsigned int id; char *keyvals;} *entityinfo;
1077 const char *entities_raw;
1079
1080 struct doll_s *dollinfo; //ragdoll info
1081 int camerabone; //the 1-based bone index that the camera should be attached to (for gltf rather than anything else)
1082
1083 shader_t *simpleskin[4]; //simpleitems cache
1084
1085 struct {
1091 void *terrain;
1093 unsigned int numbatches;
1094 struct
1095 {
1096 int first; //once built...
1097 int count; //num lightmaps
1098 int mergew; //merge this many source lightmaps together. woo.
1099 int mergeh; //merge this many source lightmaps together. woo.
1100 int width; //x size of lightmaps
1101 int height; //y size of lightmaps
1102 int surfstyles; //numbers of style per surface.
1103 int maxstyle; //highest (valid) style used (cl_max_lightstyles must be 1+ higher).
1104 enum {
1105 //vanilla used byte values, with 255 being a value of about 2.
1106 //float/hdr formats use 1 to mean 1, however.
1107 //internally, we still use integers for lighting, with .7 bits of extra precision.
1110 LM_E5BGR9
1112 qboolean deluxemapping; //lightmaps are interleaved with deluxemap data (lightmap indicies should only be even values)
1113 qboolean deluxemapping_modelspace; //deluxemaps are in modelspace - we need different glsl.
1115
1116 unsigned checksum;
1117 unsigned checksum2;
1118
1120 unsigned int numportals;
1121
1123//
1124// additional model data
1125//
1126 void *meshinfo; //data allocated within the memgroup allocations, will be nulled out when the model is flushed
1127 searchpathfuncs_t *archive; //some bsp formats have an embedded zip...
1130
1131#define MDLF_EMITREPLACE 0x0001 // particle effect engulphs model (don't draw)
1132#define MDLF_EMITFORWARDS 0x0002
1133#define MDLF_NODEFAULTTRAIL 0x0004
1134//#define MDLF_RGBLIGHTING 0x0008
1135#define MDLF_PLAYER 0x0010 // players have specific lighting values
1136#define MDLF_FLAME 0x0020 // can be excluded with r_drawflame, fullbright render hack
1137#define MDLF_DOCRC 0x0040 // model needs CRC built
1138#define MDLF_NEEDOVERBRIGHT 0x0080 // only overbright these models with gl_overbright_all set
1139#define MDLF_NOSHADOWS 0x0100 // doesn't produce shadows for one reason or another
1140#define MDLF_NOTREPLACEMENTS 0x0200 // can be considered a cheat, disable texture replacements
1141#define MDLF_EZQUAKEFBCHEAT 0x0400 // this is a blatent cheat, one that can disadvantage us fairly significantly if we don't support it.
1142#define MDLF_NOLERP 0x0800 // doesn't lerp, ever. for dodgy models that don't scale to nothingness before jumping.
1143#define MDLF_RECALCULATERAIN 0x1000 // particles changed, recalculate any sky polys
1144
1145//============================================================================
1146#endif // __MODEL__
1147
1148
1149
1150typedef struct
1151{
1152 unsigned int *offsets;
1153 unsigned short *extents;
1154 unsigned char *styles8;
1155 unsigned short *styles16;
1156 unsigned int stylesperface;
1157 unsigned char *shifts;
1158 unsigned char defaultshift;
1160void Mod_LoadLighting (struct model_s *loadmodel, bspx_header_t *bspx, qbyte *mod_base, lump_t *l, qboolean interleaveddeluxe, lightmapoverrides_t *overrides, subbsp_t subbsp);
1161
1162float RadiusFromBounds (const vec3_t mins, const vec3_t maxs);
1163
1164
1165//
1166// gl_heightmap.c
1167//
1168#ifdef TERRAIN
1169void Terr_Init(void);
1170struct plugterrainfuncs_s;
1171struct plugterrainfuncs_s *Terr_GetTerrainFuncs(size_t structsize);
1172void Terr_DrawTerrainModel (batch_t **batch, entity_t *e);
1175void Terr_PurgeTerrainModel(model_t *hm, qboolean lightmapsonly, qboolean lightmapreusable);
1176void *Mod_LoadTerrainInfo(model_t *mod, char *loadname, qboolean force); //call this after loading a bsp
1177qboolean Terrain_LocateSection(const char *name, flocation_t *loc); //used on servers to generate sections for download.
1178qboolean Heightmap_Trace(model_t *model, int forcehullnum, const framestate_t *framestate, const vec3_t axis[3], const vec3_t start, const vec3_t end, const vec3_t mins, const vec3_t maxs, qboolean capsule, unsigned int contentmask, struct trace_s *trace);
1179unsigned int Heightmap_PointContents(model_t *model, const vec3_t axis[3], const vec3_t org);
1180struct fragmentdecal_s;
1181void Terrain_ClipDecal(struct fragmentdecal_s *dec, float *center, float radius, model_t *model);
1183
1184void CL_Parse_BrushEdit(void);
1186qboolean SV_Prespawn_Brushes(sizebuf_t *msg, unsigned int *modelindex, unsigned int *lastid);
1187#endif
1188
1189
1190
1191
1192
1193qboolean Heightmap_Edit(model_t *mod, int action, float *pos, float radius, float quant);
1194
1195
1196#if defined(Q2BSPS) || defined(Q3BSPS)
1197void CM_Init(void);
1198struct model_s *CM_TempBoxModel(const vec3_t mins, const vec3_t maxs);
1199#endif
1200#if 0
1201
1202#ifdef __cplusplus
1203//#pragma warningmsg (" c++ stinks")
1204#else
1205
1206qboolean CM_SetAreaPortalState (struct model_s *mod, int portalnum, qboolean open);
1207qboolean CM_HeadnodeVisible (struct model_s *mod, int nodenum, const qbyte *visbits);
1208qboolean VARGS CM_AreasConnected (struct model_s *mod, unsigned int area1, unsigned int area2);
1209int CM_ClusterBytes (struct model_s *mod);
1210int CM_LeafContents (struct model_s *mod, int leafnum);
1211int CM_LeafCluster (struct model_s *mod, int leafnum);
1212int CM_LeafArea (struct model_s *mod, int leafnum);
1213int CM_WriteAreaBits (struct model_s *mod, qbyte *buffer, int area, qboolean merge);
1214int CM_PointLeafnum (struct model_s *mod, const vec3_t p);
1215qbyte *CM_ClusterPVS (struct model_s *mod, int cluster, pvsbuffer_t *buffer, pvsmerge_t merge);
1216qbyte *CM_ClusterPHS (struct model_s *mod, int cluster, pvsbuffer_t *buffer);
1217int CM_BoxLeafnums (struct model_s *mod, const vec3_t mins, const vec3_t maxs, int *list, int listsize, int *topnode);
1218int CM_PointContents (struct model_s *mod, const vec3_t p);
1219int CM_TransformedPointContents (struct model_s *mod, const vec3_t p, int headnode, const vec3_t origin, const vec3_t angles);
1220int CM_HeadnodeForBox (struct model_s *mod, const vec3_t mins, const vec3_t maxs);
1221//struct trace_s CM_TransformedBoxTrace (struct model_s *mod, vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, int brushmask, vec3_t origin, vec3_t angles);
1222
1223//for gamecode to control portals/areas
1224void CMQ2_SetAreaPortalState (model_t *mod, unsigned int portalnum, qboolean open);
1225void CMQ3_SetAreaPortalState (model_t *mod, unsigned int area1, unsigned int area2, qboolean open);
1226
1227//for saved games to write the raw state.
1228size_t CM_WritePortalState (model_t *mod, void **data);
1230
1231#endif
1232
1233
1234
1235#endif //Q2BSPS
1236
1237void CategorizePlane ( mplane_t *plane );
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
uint64_t qofs_t
Definition: api_menu.h:49
vec_t vec2_t[2]
Definition: api_menu.h:39
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
frac
Definition: com_mesh.c:2483
int bonecount
Definition: com_mesh.c:726
vbo_t vbo
Definition: com_mesh.c:737
dReal int direction
Definition: com_phys_ode.c:291
void dNearCallback * callback
Definition: com_phys_ode.c:655
int num
Definition: com_phys_ode.c:314
dReal dReal radius
Definition: com_phys_ode.c:289
unsigned char qbyte
Definition: common.h:127
s
Definition: execloop.h:53
struct hull_s hull_t
qboolean SV_Parse_BrushEdit(void)
Definition: gl_heightmap.c:6902
struct mfog_s mfog_t
void Terr_DrawTerrainModel(batch_t **batch, entity_t *e)
Definition: gl_heightmap.c:3014
struct fragmentdecal_s fragmentdecal_t
Definition: gl_model.h:608
void Q1BSP_Init(void)
Definition: q1bsp.c:2512
@ MLS_FAILED
Definition: gl_model.h:969
@ MLS_NOTLOADED
Definition: gl_model.h:966
@ MLS_LOADING
Definition: gl_model.h:967
@ MLS_LOADED
Definition: gl_model.h:968
int CM_LeafArea(struct model_s *mod, int leafnum)
int CM_TransformedPointContents(struct model_s *mod, const vec3_t p, int headnode, const vec3_t origin, const vec3_t angles)
float RadiusFromBounds(const vec3_t mins, const vec3_t maxs)
Definition: gl_q2bsp.c:99
void Mod_LoadLighting(struct model_s *loadmodel, bspx_header_t *bspx, qbyte *mod_base, lump_t *l, qboolean interleaveddeluxe, lightmapoverrides_t *overrides, subbsp_t subbsp)
Definition: gl_model.c:1610
size_t CM_WritePortalState(model_t *mod, void **data)
void Mod_ClipDecal(struct model_s *mod, vec3_t center, vec3_t normal, vec3_t tangent1, vec3_t tangent2, float size, unsigned int surfflagmask, unsigned int surflagmatch, void(*callback)(void *ctx, vec3_t *fte_restrict points, size_t numpoints, shader_t *shader), void *ctx)
Definition: q1bsp.c:592
qboolean Terrain_LocateSection(const char *name, flocation_t *loc)
Definition: gl_heightmap.c:1898
void rag_uninstanciateall(void)
Definition: pr_skelobj.c:706
struct bspx_header_s bspx_header_t
Definition: gl_model.h:34
void Terr_FreeModel(model_t *mod)
Definition: gl_heightmap.c:2188
qboolean Heightmap_Edit(model_t *mod, int action, float *pos, float radius, float quant)
void rag_updatedeltaent(struct world_s *w, entity_t *ent, lerpents_t *le)
Definition: pr_skelobj.c:1586
struct plugterrainfuncs_s * Terr_GetTerrainFuncs(size_t structsize)
Definition: gl_heightmap.c:9130
int CM_PointContents(struct model_s *mod, const vec3_t p)
int CM_PointLeafnum(struct model_s *mod, const vec3_t p)
void Terr_PurgeTerrainModel(model_t *hm, qboolean lightmapsonly, qboolean lightmapreusable)
Definition: gl_heightmap.c:2111
qboolean Heightmap_Trace(model_t *model, int forcehullnum, const framestate_t *framestate, const vec3_t axis[3], const vec3_t start, const vec3_t end, const vec3_t mins, const vec3_t maxs, qboolean capsule, unsigned int contentmask, struct trace_s *trace)
Definition: gl_heightmap.c:4087
bspx_header_t * BSPX_Setup(struct model_s *mod, char *filebase, size_t filelen, lump_t *lumps, size_t numlumps)
Definition: q1bsp.c:2599
void GL_SelectVBO(int vbo)
Definition: gl_backend.c:478
void rag_freedoll(struct doll_s *doll)
Definition: pr_skelobj.c:684
void skel_reset(struct world_s *world)
Definition: pr_skelobj.c:1017
struct mspriteframe_s mspriteframe_t
void BSPX_LightGridLoad(struct model_s *model, bspx_header_t *bspx, qbyte *mod_base)
Definition: gl_rlight.c:2984
void Terr_FinishTerrain(model_t *model)
Definition: gl_heightmap.c:5495
mtriangle_t triangles[MAXALIASTRIS]
qboolean Terr_DownloadedSection(char *fname)
Definition: gl_heightmap.c:1420
struct texture_s texture_t
qboolean CM_HeadnodeVisible(struct model_s *mod, int nodenum, const qbyte *visbits)
void GLQ1BSP_LightPointValues(struct model_s *model, const vec3_t point, vec3_t res_diffuse, vec3_t res_ambient, vec3_t res_dir)
Definition: gl_rlight.c:3168
int CM_ClusterBytes(struct model_s *mod)
void rag_flushdolls(qboolean force)
Definition: pr_skelobj.c:714
void * BSPX_FindLump(bspx_header_t *bspxheader, void *mod_base, char *lumpname, int *lumpsize)
Definition: q1bsp.c:2582
mspriteframe_t * R_GetSpriteFrame(entity_t *currententity)
Definition: renderer.c:2496
void * Mod_LoadTerrainInfo(model_t *mod, char *loadname, qboolean force)
Definition: gl_heightmap.c:8671
void BSPX_LoadEnvmaps(struct model_s *mod, bspx_header_t *bspx, void *mod_base)
Definition: q1bsp.c:2648
void Q1BSP_MarkLights(dlight_t *light, dlightbitmask_t bit, mnode_t *node)
Definition: q1bsp.c:1651
void Fragment_ClipPoly(fragmentdecal_t *dec, int numverts, float *inverts, shader_t *surfshader)
Definition: q1bsp.c:373
fromgame_t
Definition: gl_model.h:895
@ fg_doom3
Definition: gl_model.h:895
@ fg_quake2
Definition: gl_model.h:895
@ fg_halflife
Definition: gl_model.h:895
@ fg_quake
Definition: gl_model.h:895
@ fg_doom
Definition: gl_model.h:895
@ fg_quake3
Definition: gl_model.h:895
@ fg_new
Definition: gl_model.h:895
shadersort_t
Definition: gl_model.h:36
@ SHADER_SORT_UNLITDECAL
Definition: gl_model.h:47
@ SHADER_SORT_BANNER
Definition: gl_model.h:48
@ SHADER_SORT_UNDERWATER
Definition: gl_model.h:49
@ SHADER_SORT_ADDITIVE
Definition: gl_model.h:51
@ SHADER_SORT_DEFERREDLIGHT
Definition: gl_model.h:39
@ SHADER_SORT_PORTAL
Definition: gl_model.h:40
@ SHADER_SORT_COUNT
Definition: gl_model.h:55
@ SHADER_SORT_NONE
Definition: gl_model.h:37
@ SHADER_SORT_RIPPLE
Definition: gl_model.h:38
@ SHADER_SORT_BLEND
Definition: gl_model.h:50
@ SHADER_SORT_NEAREST
Definition: gl_model.h:52
@ SHADER_SORT_OPAQUE
Definition: gl_model.h:42
@ SHADER_SORT_SEETHROUGH
Definition: gl_model.h:45
@ SHADER_SORT_SKY
Definition: gl_model.h:41
@ SHADER_SORT_DECAL
Definition: gl_model.h:44
struct mtexinfo_s mtexinfo_t
struct vbo_s vbo_t
struct mnode_s mnode_t
int CM_BoxLeafnums(struct model_s *mod, const vec3_t mins, const vec3_t maxs, int *list, int listsize, int *topnode)
int CM_LeafCluster(struct model_s *mod, int leafnum)
unsigned int boneidx_t
Definition: gl_model.h:67
void Terrain_ClipDecal(struct fragmentdecal_s *dec, float *center, float radius, model_t *model)
Definition: gl_heightmap.c:3129
qofs_t CM_ReadPortalState(model_t *mod, qbyte *ptr, qofs_t ptrsize)
qboolean SV_Prespawn_Brushes(sizebuf_t *msg, unsigned int *modelindex, unsigned int *lastid)
Definition: gl_heightmap.c:6832
struct model_s model_t
unsigned int Heightmap_PointContents(model_t *model, const vec3_t axis[3], const vec3_t org)
Definition: gl_heightmap.c:3302
qbyte * CM_ClusterPVS(struct model_s *mod, int cluster, pvsbuffer_t *buffer, pvsmerge_t merge)
struct model_s * CM_TempBoxModel(const vec3_t mins, const vec3_t maxs)
Definition: gl_q2bsp.c:5301
mstvert_t stverts[MAXALIASVERTS *2]
void rag_doallanimations(struct world_s *world)
Definition: pr_skelobj.c:1468
qboolean Q1BSP_RecursiveHullCheck(hull_t *hull, int num, const vec3_t p1, const vec3_t p2, unsigned int hitcontents, struct trace_s *trace)
Definition: q1bsp.c:881
struct batch_s batch_t
size_t Fragment_ClipPlaneToBrush(vecV_t *points, size_t maxpoints, void *planes, size_t planestride, size_t numplanes, vec4_t face)
Definition: q1bsp.c:84
void CMQ3_SetAreaPortalState(model_t *mod, unsigned int area1, unsigned int area2, qboolean open)
subbsp_t
Definition: gl_model.h:896
@ sb_long2
Definition: gl_model.h:896
@ sb_long1
Definition: gl_model.h:896
@ sb_none
Definition: gl_model.h:896
@ sb_quake64
Definition: gl_model.h:896
void CM_Init(void)
Definition: gl_q2bsp.c:7916
void Q1BSP_GenerateShadowMesh(struct model_s *model, struct dlight_s *dl, const qbyte *lightvis, qbyte *litvis, void(*callback)(msurface_t *surf))
Definition: gl_shadow.c:927
qboolean CM_SetAreaPortalState(struct model_s *mod, int portalnum, qboolean open)
int CM_HeadnodeForBox(struct model_s *mod, const vec3_t mins, const vec3_t maxs)
struct mleaf_s mleaf_t
void CMQ2_SetAreaPortalState(model_t *mod, unsigned int portalnum, qboolean open)
void rag_lerpdeltaent(lerpents_t *le, unsigned int bonecount, short *newstate, float frac, short *oldstate)
Definition: pr_skelobj.c:1514
void rag_removedeltaent(lerpents_t *le)
Definition: pr_skelobj.c:1492
boneidx_t bone_vec4_t[4]
Definition: gl_model.h:75
void Q1BSP_CheckHullNodes(hull_t *hull)
Definition: q1bsp.c:663
struct doll_s * rag_createdollfromstring(struct model_s *mod, const char *fname, int numbones, const char *file)
Definition: pr_skelobj.c:633
struct mesh_s mesh_t
pvsmerge_t
Definition: gl_model.h:262
@ PVM_FAST
Definition: gl_model.h:263
@ PVM_REPLACE
Definition: gl_model.h:265
@ PVM_MERGE
Definition: gl_model.h:264
qboolean VARGS CM_AreasConnected(struct model_s *mod, unsigned int area1, unsigned int area2)
void CategorizePlane(mplane_t *plane)
Definition: gl_q2bsp.c:448
void CalcSurfaceExtents(model_t *mod, msurface_t *s)
Definition: gl_q2bsp.c:112
dtrivertx_t * poseverts[MAXALIASFRAMES]
void Q1BSP_SetModelFuncs(struct model_s *mod)
Definition: q1bsp.c:2518
int CM_LeafContents(struct model_s *mod, int leafnum)
void GL_SelectEBO(int vbo)
Definition: gl_backend.c:496
modtype_t
Definition: gl_model.h:894
@ mod_heightmap
Definition: gl_model.h:894
@ mod_halflife
Definition: gl_model.h:894
@ mod_dummy
Definition: gl_model.h:894
@ mod_alias
Definition: gl_model.h:894
@ mod_brush
Definition: gl_model.h:894
@ mod_sprite
Definition: gl_model.h:894
qbyte * CM_ClusterPHS(struct model_s *mod, int cluster, pvsbuffer_t *buffer)
int CM_WriteAreaBits(struct model_s *mod, qbyte *buffer, int area, qboolean merge)
struct mtriangle_s mtriangle_t
void Terr_Init(void)
Definition: gl_heightmap.c:9141
void GL_DeselectVAO(void)
Definition: gl_backend.c:488
void CL_Parse_BrushEdit(void)
Definition: gl_heightmap.c:6714
struct msurface_s msurface_t
void Q1BSP_LoadBrushes(struct model_s *model, bspx_header_t *bspx, void *mod_base)
Definition: q1bsp.c:1393
aliashdr_t * pheader
qbyte * mod_base
vec3_t * points
Definition: gl_shadow.c:1323
unsigned int maxpoints
Definition: gl_shadow.c:1322
unsigned int numpoints
Definition: gl_shadow.c:1321
static EGLSurface EGLSurface EGLContext ctx
Definition: gl_videgl.c:47
struct @319::xidevinfo::@353 axis[2]
static CONST PIXELFORMATDESCRIPTOR *static int
Definition: gl_vidnt.c:222
GLuint GLcharARB * name
Definition: glquake.h:155
GLint size
Definition: glquake.h:157
GLfloat GLfloat GLfloat GLfloat w
Definition: glquake.h:158
const GLfloat * v
Definition: glsupp.h:466
GLint GLfloat * parms
Definition: glsupp.h:612
static png_size_t start
Definition: image.c:1419
keynum_t pos
Definition: in_sdl.c:105
char fname[MAX_QPATH]
Definition: m_mp3.c:160
synctype_t
Definition: modelgen.h:53
char ** data
Definition: p_script.c:63
unsigned int bit
Definition: pr_cmds.c:204
int const void * p
Definition: pr_lua.c:232
int b
Definition: pr_lua.c:242
int const char * e
Definition: pr_lua.c:259
float scale
Definition: pr_menu.c:106
evalc_t angles
Definition: pr_menu.c:1357
evalc_t origin
Definition: pr_menu.c:1356
evalc_t mins
Definition: pr_menu.c:1354
evalc_t maxs
Definition: pr_menu.c:1355
const char * file
Definition: qcc_pr_lex.c:2518
shader_t * shader
Definition: r_2d.c:51
int lastid
Definition: r_2d.c:49
cm_surface_t * surf
Definition: r_d3.c:697
vec3_t end
Definition: r_d3.c:692
unsigned short index_t
Definition: render.h:56
entity_t * currententity
Definition: renderer.c:22
enum uploadfmt uploadfmt_t
static ALC_API ALCvoid * buffer
Definition: snd_al.c:259
static int void * ptr
Definition: snd_dma.c:483
spriteframetype_t
Definition: spritegn.h:115
Definition: gl_model.h:716
synctype_t synctype
Definition: gl_model.h:729
int skinwidth
Definition: gl_model.h:724
int triangles
Definition: gl_model.h:737
int poseverts
Definition: gl_model.h:733
int version
Definition: gl_model.h:718
int numframes
Definition: gl_model.h:728
int numtris
Definition: gl_model.h:727
int numskins
Definition: gl_model.h:723
int posedata
Definition: gl_model.h:734
int commands
Definition: gl_model.h:739
float boundingradius
Definition: gl_model.h:721
int skinheight
Definition: gl_model.h:725
vec3_t scale
Definition: gl_model.h:719
vec3_t scale_origin
Definition: gl_model.h:720
int baseposedata
Definition: gl_model.h:736
int numposes
Definition: gl_model.h:732
int flags
Definition: gl_model.h:730
float size
Definition: gl_model.h:731
int numverts
Definition: gl_model.h:726
int ident
Definition: gl_model.h:717
vec3_t eyeposition
Definition: gl_model.h:722
Definition: gl_model.h:133
mesh_t ** mesh
Definition: gl_model.h:134
unsigned int firstmesh
Definition: gl_model.h:137
struct texnums_s * skin
Definition: gl_model.h:152
entity_t * ent
Definition: gl_model.h:141
shader_t * shader
Definition: gl_model.h:139
lightstyleindex_t lmlightstyle[MAXRLIGHTMAPS]
Definition: gl_model.h:146
unsigned int lightidx
Definition: gl_model.h:172
unsigned char vtlightstyle[MAXRLIGHTMAPS]
Definition: gl_model.h:147
struct vbo_s * vbo
Definition: gl_model.h:140
unsigned int maxmeshes
Definition: gl_model.h:149
union batch_s::@298 user
unsigned int ebobatch
Definition: gl_model.h:163
unsigned int surface
Definition: gl_model.h:181
struct texture_s * texture
Definition: gl_model.h:151
struct batch_s * next
Definition: gl_model.h:135
short lightmap[MAXRLIGHTMAPS]
Definition: gl_model.h:145
struct mfog_s * fog
Definition: gl_model.h:142
void(* buildmeshes)(struct batch_s *b)
Definition: gl_model.h:154
struct batch_s::@298::@300 dlight
unsigned int shadowbatch
Definition: gl_model.h:164
mesh_t * meshptr
Definition: gl_model.h:192
unsigned int meshes
Definition: gl_model.h:136
unsigned int recursefirst[R_MAX_RECURSE-2]
Definition: gl_model.h:156
unsigned int lightmode
Definition: gl_model.h:173
mesh_t meshbuf
Definition: gl_model.h:191
image_t * envmap
Definition: gl_model.h:143
struct batch_s::@298::@302 poly
vec4_t plane
Definition: gl_model.h:168
unsigned short surfrefs[sizeof(mesh_t)/sizeof(unsigned short)]
Definition: gl_model.h:177
unsigned int flags
Definition: gl_model.h:150
struct batch_s::@298::@301 alias
struct batch_s::@298::@299 bmodel
Definition: render.h:598
Definition: gl_model.h:947
quint16_t lmsize[2]
Definition: gl_model.h:948
vec4_t lmvecs[2]
Definition: gl_model.h:950
quint32_t lmoffset
Definition: gl_model.h:949
Definition: gl_model.h:445
int cubesize
Definition: gl_model.h:447
vec3_t origin
Definition: gl_model.h:446
Definition: client.h:315
Definition: gl_model.h:859
Definition: modelgen.h:116
Definition: render.h:99
Definition: gl_model.h:953
vec4_t lmvecs[2]
Definition: gl_model.h:954
float lmvecscale[2]
Definition: gl_model.h:955
Definition: common.h:577
Definition: merged.h:59
Definition: gl_model.h:587
int firstclipnode
Definition: gl_model.h:590
vec3_t clip_maxs
Definition: gl_model.h:593
mclipnode_t * clipnodes
Definition: gl_model.h:588
int lastclipnode
Definition: gl_model.h:591
vec3_t clip_mins
Definition: gl_model.h:592
int available
Definition: gl_model.h:594
mplane_t * planes
Definition: gl_model.h:589
Definition: merged.h:238
Definition: client.h:589
Definition: gl_model.h:1151
unsigned int stylesperface
Definition: gl_model.h:1156
unsigned char * styles8
Definition: gl_model.h:1154
unsigned char defaultshift
Definition: gl_model.h:1158
unsigned int * offsets
Definition: gl_model.h:1152
unsigned short * styles16
Definition: gl_model.h:1155
unsigned char * shifts
Definition: gl_model.h:1157
unsigned short * extents
Definition: gl_model.h:1153
Definition: bspfile.h:79
Definition: gl_model.h:678
dtrivertx_t bboxmax
Definition: gl_model.h:683
int firstpose
Definition: gl_model.h:679
vec3_t scale_origin
Definition: gl_model.h:686
dtrivertx_t bboxmin
Definition: gl_model.h:682
vec3_t scale
Definition: gl_model.h:685
float interval
Definition: gl_model.h:681
int numposes
Definition: gl_model.h:680
int frame
Definition: gl_model.h:688
Definition: gl_model.h:700
int numframes
Definition: gl_model.h:701
int intervals
Definition: gl_model.h:702
Definition: gl_model.h:693
dtrivertx_t bboxmin
Definition: gl_model.h:694
int frame
Definition: gl_model.h:696
dtrivertx_t bboxmax
Definition: gl_model.h:695
Definition: bspfile.h:236
Definition: gl_model.h:825
int num_st
Definition: gl_model.h:835
int framesize
Definition: gl_model.h:831
int skinheight
Definition: gl_model.h:830
int ofs_skins
Definition: gl_model.h:840
int ident
Definition: gl_model.h:826
int ofs_frames
Definition: gl_model.h:843
int ofs_glcmds
Definition: gl_model.h:844
int num_frames
Definition: gl_model.h:838
int num_glcmds
Definition: gl_model.h:837
int num_tris
Definition: gl_model.h:836
int num_skins
Definition: gl_model.h:833
int ofs_st
Definition: gl_model.h:841
int ofs_tris
Definition: gl_model.h:842
int ofs_end
Definition: gl_model.h:845
int skinwidth
Definition: gl_model.h:829
int version
Definition: gl_model.h:827
int num_xyz
Definition: gl_model.h:834
Definition: gl_model.h:807
Definition: gl_model.h:781
short t
Definition: gl_model.h:783
short s
Definition: gl_model.h:782
Definition: gl_model.h:787
Definition: gl_model.h:793
qbyte lightnormalindex
Definition: gl_model.h:795
Definition: gl_model.h:410
Definition: gl_model.h:450
texid_t image
Definition: gl_model.h:454
int cubesize
Definition: gl_model.h:452
vec3_t origin
Definition: gl_model.h:451
Definition: gl_model.h:90
unsigned int vbofirstvert
Definition: gl_model.h:95
unsigned int vbofirstelement
Definition: gl_model.h:96
float xyz_blendw[2]
Definition: gl_model.h:102
vec3_t * snormals_array
Definition: gl_model.h:108
vec3_t * normals_array
Definition: gl_model.h:107
const float * bones
Definition: gl_model.h:122
qboolean istrifan
Definition: gl_model.h:121
index_t * indexes
Definition: gl_model.h:115
vecV_t * xyz2_array
Definition: gl_model.h:106
avec4_t * colors4f_array[MAXRLIGHTMAPS]
Definition: gl_model.h:112
bone_vec4_t * bonenums
Definition: gl_model.h:124
int * trneighbors
Definition: gl_model.h:118
vec2_t * st_array
Definition: gl_model.h:110
vecV_t * xyz_array
Definition: gl_model.h:105
vec3_t * trnormals
Definition: gl_model.h:119
vec4_t * boneweights
Definition: gl_model.h:125
int numvertexes
Definition: gl_model.h:91
int numindexes
Definition: gl_model.h:92
byte_vec4_t * colors4b_array
Definition: gl_model.h:113
vec3_t * tnormals_array
Definition: gl_model.h:109
int numbones
Definition: gl_model.h:123
vec2_t * lmst_array[MAXRLIGHTMAPS]
Definition: gl_model.h:111
Definition: gl_model.h:434
int numplanes
Definition: gl_model.h:440
struct shader_s * shader
Definition: gl_model.h:436
mplane_t ** planes
Definition: gl_model.h:441
char shadername[MAX_QPATH]
Definition: gl_model.h:435
mplane_t * visibleplane
Definition: gl_model.h:438
Definition: gl_model.h:539
int area
Definition: gl_model.h:558
int cluster
Definition: gl_model.h:557
int contents
Definition: gl_model.h:541
qbyte ambient_sound_level[NUM_AMBIENTS]
Definition: gl_model.h:554
msurface_t ** firstmarksurface
Definition: gl_model.h:552
qbyte * compressed_vis
Definition: gl_model.h:550
unsigned int firstleafpatch
Definition: gl_model.h:565
float minmaxs[6]
Definition: gl_model.h:545
unsigned int numleafpatches
Definition: gl_model.h:566
int nummarksurfaces
Definition: gl_model.h:553
unsigned int firstleafbrush
Definition: gl_model.h:559
unsigned int firstleafcmesh
Definition: gl_model.h:563
unsigned int numleafcmeshes
Definition: gl_model.h:564
unsigned int numleafbrushes
Definition: gl_model.h:560
struct mnode_s * parent
Definition: gl_model.h:547
int shadowframe
Definition: gl_model.h:543
int visframe
Definition: gl_model.h:542
Definition: gl_model.h:572
struct q2cbrush_s * brushes
Definition: gl_model.h:580
unsigned int visleafs
Definition: gl_model.h:576
unsigned int firstface
Definition: gl_model.h:577
unsigned int numbrushes
Definition: gl_model.h:581
Definition: gl_model.h:514
mplane_t * plane
Definition: gl_model.h:526
struct mnode_s * parent
Definition: gl_model.h:522
unsigned int numsurfaces
Definition: gl_model.h:533
int visframe
Definition: gl_model.h:517
int contents
Definition: gl_model.h:516
int shadowframe
Definition: gl_model.h:518
int childnum[2]
Definition: gl_model.h:529
float minmaxs[6]
Definition: gl_model.h:520
struct mnode_s * children[2]
Definition: gl_model.h:527
unsigned int firstsurface
Definition: gl_model.h:532
Definition: gl_model.h:972
int numtextures
Definition: gl_model.h:1056
qbyte * lightdata
Definition: gl_model.h:1062
void * vis
Definition: gl_model.h:1061
qboolean pushdepth
Definition: gl_model.h:979
qboolean deluxemapping_modelspace
Definition: gl_model.h:1113
int entitiescrc
Definition: gl_model.h:1078
mfog_t * fogs
Definition: gl_model.h:1066
int surfstyles
Definition: gl_model.h:1102
msurface_t ** marksurfaces
Definition: gl_model.h:1052
size_t numentityinfo
Definition: gl_model.h:1076
fromgame_t fromgame
Definition: gl_model.h:985
mmodel_t * submodels
Definition: gl_model.h:1016
int mergeh
Definition: gl_model.h:1099
modelfuncs_t funcs
Definition: gl_model.h:1122
qbyte * pvs
Definition: gl_model.h:1059
portal_t * portal
Definition: gl_model.h:1119
int numframes
Definition: gl_model.h:987
mnode_t * nodes
Definition: gl_model.h:1036
float maxlod
Definition: gl_model.h:1001
int numclusters
Definition: gl_model.h:1022
batch_t * batches[SHADER_SORT_COUNT]
Definition: gl_model.h:1092
struct surfedgenormals_s * surfedgenormals
Definition: gl_model.h:1029
qbyte * visdata
Definition: gl_model.h:1060
unsigned int numbatches
Definition: gl_model.h:1093
struct facelmvecs_s * facelmvecs
Definition: gl_model.h:1030
void * meshinfo
Definition: gl_model.h:1126
mleaf_t * leafs
Definition: gl_model.h:1024
char * keyvals
Definition: gl_model.h:1075
int nummarksurfaces
Definition: gl_model.h:1051
shader_t * simpleskin[4]
Definition: gl_model.h:1083
int width
Definition: gl_model.h:1100
mtexinfo_t * texinfo
Definition: gl_model.h:1040
const char * entities_raw
Definition: gl_model.h:1077
int numclipnodes
Definition: gl_model.h:1048
unsigned checksum2
Definition: gl_model.h:1117
struct skytriblock_s * skytrimem
Definition: gl_model.h:1073
qboolean tainted
Definition: gl_model.h:978
int datasequence
Definition: gl_model.h:975
qbyte * deluxdata
Definition: gl_model.h:1063
synctype_t synctype
Definition: gl_model.h:988
q3lightgridinfo_t * lightgrid
Definition: gl_model.h:1065
hull_t hulls[MAX_MAP_HULLSM]
Definition: gl_model.h:1054
int numplanes
Definition: gl_model.h:1018
@ LM_RGB8
Definition: gl_model.h:1109
int traildefaultindex
Definition: gl_model.h:993
void * terrain
Definition: gl_model.h:1091
mnode_t * rootnode
Definition: gl_model.h:1037
int particleeffect
Definition: gl_model.h:991
mplane_t * planes
Definition: gl_model.h:1019
qboolean deluxemapping
Definition: gl_model.h:1112
char publicname[MAX_QPATH]
Definition: gl_model.h:974
struct model_s::@343 lightmaps
vec3_t mins
Definition: gl_model.h:998
zonegroup_t memgroup
Definition: gl_model.h:1128
unsigned int id
Definition: gl_model.h:1075
int count
Definition: gl_model.h:1097
qbyte * phs
Definition: gl_model.h:1059
int numleafs
Definition: gl_model.h:1023
unsigned checksum
Definition: gl_model.h:1116
struct model_s::@339 * entityinfo
struct doll_s * dollinfo
Definition: gl_model.h:1080
int maxstyle
Definition: gl_model.h:1103
vbo_t * vbo
Definition: gl_model.h:1087
float skytime
Definition: gl_model.h:1072
int numnodes
Definition: gl_model.h:1035
int numsubmodels
Definition: gl_model.h:1015
vec3_t * normals
Definition: gl_model.h:1028
vec3_t clipmaxs
Definition: gl_model.h:1007
void * cnodes
Definition: gl_model.h:1009
int numsurfaces
Definition: gl_model.h:1042
struct model_s::@341 * shadowbatches
int numtexinfo
Definition: gl_model.h:1039
int numsurfedges
Definition: gl_model.h:1045
@ LM_E5BGR9
Definition: gl_model.h:1110
int firstmodelsurface
Definition: gl_model.h:1013
mclipnode_t * clipnodes
Definition: gl_model.h:1049
int numedges
Definition: gl_model.h:1032
unsigned lightdatasize
Definition: gl_model.h:1064
@ LM_L8
Definition: gl_model.h:1108
enum model_s::@343::@347 fmt
struct skytris_s * skytris
Definition: gl_model.h:1071
vec3_t maxs
Definition: gl_model.h:998
int engineflags
Definition: gl_model.h:976
msurface_t * surfaces
Definition: gl_model.h:1043
int mergew
Definition: gl_model.h:1098
searchpathfuncs_t * archive
Definition: gl_model.h:1127
modtype_t type
Definition: gl_model.h:984
int first
Definition: gl_model.h:1096
time_t mtime
Definition: gl_model.h:980
unsigned numenvmaps
Definition: gl_model.h:1069
int * surfedges
Definition: gl_model.h:1046
menvmap_t * envmaps
Definition: gl_model.h:1068
int camerabone
Definition: gl_model.h:1081
float clampscale
Definition: gl_model.h:1000
mvertex_t * vertexes
Definition: gl_model.h:1027
int loadstate
Definition: gl_model.h:977
float radius
Definition: gl_model.h:999
vbo_t * vbos
Definition: gl_model.h:1090
medge_t * edges
Definition: gl_model.h:1033
int numvertexes
Definition: gl_model.h:1026
int nummodelsurfaces
Definition: gl_model.h:1013
qboolean clipbox
Definition: gl_model.h:1006
unsigned int numportals
Definition: gl_model.h:1120
size_t pvsbytes
Definition: gl_model.h:1021
int height
Definition: gl_model.h:1101
struct model_s * submodelof
Definition: gl_model.h:982
int flags
Definition: gl_model.h:990
vec3_t clipmins
Definition: gl_model.h:1007
int numshadowbatches
Definition: gl_model.h:1089
texture_t * tex
Definition: gl_model.h:1086
int particletrail
Definition: gl_model.h:992
int numfogs
Definition: gl_model.h:1067
texture_t ** textures
Definition: gl_model.h:1057
Definition: gl_model.h:268
Definition: render.h:193
Definition: gl_model.h:653
int maxheight
Definition: gl_model.h:656
int numframes
Definition: gl_model.h:657
float beamlength
Definition: gl_model.h:658
int maxwidth
Definition: gl_model.h:655
int type
Definition: gl_model.h:654
Definition: gl_model.h:628
float up
Definition: gl_model.h:629
float right
Definition: gl_model.h:629
float left
Definition: gl_model.h:629
qboolean lit
Definition: gl_model.h:631
shader_t * shader
Definition: gl_model.h:632
qboolean xmirror
Definition: gl_model.h:630
float down
Definition: gl_model.h:629
image_t * image
Definition: gl_model.h:633
Definition: gl_model.h:647
spriteframetype_t type
Definition: gl_model.h:648
mspriteframe_t * frameptr
Definition: gl_model.h:649
Definition: gl_model.h:640
float * intervals
Definition: gl_model.h:642
int numframes
Definition: gl_model.h:641
Definition: gl_model.h:672
int s
Definition: gl_model.h:673
int t
Definition: gl_model.h:674
Definition: gl_model.h:459
int cached_colour[MAXCPULIGHTMAPS]
Definition: gl_model.h:494
qboolean cached_dlight
Definition: gl_model.h:487
int visframe
Definition: gl_model.h:478
int cached_light[MAXCPULIGHTMAPS]
Definition: gl_model.h:493
image_t * envmap
Definition: gl_model.h:472
unsigned short lmshift
Definition: gl_model.h:466
int firstedge
Definition: gl_model.h:463
batch_t * sbatch
Definition: gl_model.h:476
mtexinfo_t * texinfo
Definition: gl_model.h:477
int dlightframe
Definition: gl_model.h:486
mesh_t * mesh
Definition: gl_model.h:474
qbyte vlstyles[MAXRLIGHTMAPS]
Definition: gl_model.h:492
unsigned short light_t[MAXRLIGHTMAPS]
Definition: gl_model.h:470
int lightmaptexturenums[MAXRLIGHTMAPS]
Definition: gl_model.h:490
int texturemins[2]
Definition: gl_model.h:467
mfog_t * fog
Definition: gl_model.h:473
short extents[2]
Definition: gl_model.h:468
qbyte * samples
Definition: gl_model.h:498
lightstyleindex_t styles[MAXCPULIGHTMAPS]
Definition: gl_model.h:491
mplane_t * plane
Definition: gl_model.h:460
int shadowframe
Definition: gl_model.h:480
unsigned short numedges
Definition: gl_model.h:464
int flags
Definition: gl_model.h:461
dlightbitmask_t dlightbits
Definition: gl_model.h:485
qboolean stained
Definition: gl_model.h:496
unsigned short light_s[MAXRLIGHTMAPS]
Definition: gl_model.h:470
Definition: gl_model.h:415
int numframes
Definition: gl_model.h:422
int flags
Definition: gl_model.h:419
float vecscale[2]
Definition: gl_model.h:417
vec4_t vecs[2]
Definition: gl_model.h:416
struct mtexinfo_s * next
Definition: gl_model.h:423
texture_t * texture
Definition: gl_model.h:418
Definition: gl_model.h:707
int xyz_index[3]
Definition: gl_model.h:708
int pad[2]
Definition: gl_model.h:711
int st_index[3]
Definition: gl_model.h:709
Definition: gl_model.h:311
vec3_t position
Definition: gl_model.h:312
Definition: gl_terrain.h:437
int model_t * mod
Definition: gl_terrain.h:441
Definition: gl_model.h:935
vec3_t min
Definition: gl_model.h:940
float dist
Definition: gl_model.h:939
int numpoints
Definition: gl_model.h:942
vec4_t * points
Definition: gl_model.h:943
vec3_t max
Definition: gl_model.h:941
vec3_t plane
Definition: gl_model.h:938
int walkno
Definition: gl_model.h:936
Definition: gl_model.h:257
size_t buffersize
Definition: gl_model.h:259
qbyte * buffer
Definition: gl_model.h:258
Definition: bspfile.h:939
Definition: com_bih.h:18
Definition: gl_model.h:874
vec3_t gridMins
Definition: gl_model.h:876
rbspgridlight_t * rbspelements
Definition: gl_model.h:880
vec3_t gridSize
Definition: gl_model.h:877
int numlightgridelems
Definition: gl_model.h:878
unsigned short * rbspindexes
Definition: gl_model.h:881
dq3gridlight_t * lightgrid
Definition: gl_model.h:883
Definition: gl_model.h:866
Definition: render.h:255
Definition: fs.h:34
Definition: shader.h:602
Definition: common.h:196
Definition: gl_model.h:958
quint32_t s
Definition: gl_model.h:960
quint32_t n
Definition: gl_model.h:959
quint32_t t
Definition: gl_model.h:961
Definition: merged.h:383
Definition: gl_model.h:365
unsigned int srcheight
Definition: gl_model.h:378
unsigned vwidth
Definition: gl_model.h:367
unsigned vheight
Definition: gl_model.h:367
struct shader_s * shader
Definition: gl_model.h:369
char * partname
Definition: gl_model.h:370
unsigned int srcwidth
Definition: gl_model.h:378
unsigned int anim_min
Definition: gl_model.h:373
unsigned int anim_total
Definition: gl_model.h:372
qbyte * palette
Definition: gl_model.h:380
struct texture_s * anim_next
Definition: gl_model.h:374
struct texture_s * alternate_anims
Definition: gl_model.h:375
unsigned int anim_max
Definition: gl_model.h:373
uploadfmt_t srcfmt
Definition: gl_model.h:377
qbyte * srcdata
Definition: gl_model.h:379
Definition: world.h:61
Definition: gl_model.h:320
unsigned int vaodynamic
Definition: gl_model.h:333
int vao
Definition: gl_model.h:332
void * vbomem
Definition: gl_model.h:351
unsigned int numbones
Definition: gl_model.h:356
unsigned int numvisible
Definition: gl_model.h:321
vboarray_t bonenums
Definition: gl_model.h:347
void * ebomem
Definition: gl_model.h:352
vboarray_t colours[MAXRLIGHTMAPS]
Definition: gl_model.h:345
unsigned int vbobones
Definition: gl_model.h:354
vboarray_t texcoord
Definition: gl_model.h:337
vboarray_t lmcoord[MAXRLIGHTMAPS]
Definition: gl_model.h:338
vboarray_t coord2
Definition: gl_model.h:336
unsigned int vaoenabled
Definition: gl_model.h:334
struct vbo_s * next
Definition: gl_model.h:358
const float * bones
Definition: gl_model.h:355
unsigned int meshcount
Definition: gl_model.h:326
qboolean colours_bytes
Definition: gl_model.h:344
vboarray_t normals
Definition: gl_model.h:340
vboarray_t indicies
Definition: gl_model.h:329
unsigned int vertcount
Definition: gl_model.h:325
vboarray_t coord
Definition: gl_model.h:335
struct msurface_s ** meshlist
Definition: gl_model.h:327
vboarray_t boneweights
Definition: gl_model.h:349
void * vertdata
Definition: gl_model.h:330
struct msurface_s ** vislist
Definition: gl_model.h:322
vboarray_t tvector
Definition: gl_model.h:342
vboarray_t svector
Definition: gl_model.h:341
unsigned int indexcount
Definition: gl_model.h:324
Definition: pr_common.h:13
Definition: world.h:207
Definition: zone.h:130
Definition: gl_model.h:926
int numsidedefs
Definition: gl_model.h:929
int numsectors
Definition: gl_model.h:930
int numlinedefs
Definition: gl_model.h:928
Definition: merged.h:342