rtexture_t *glowtexture;
// alpha texture (used for fogging), NULL if opaque
rtexture_t *fogtexture;
+ // detail texture (usually not used if transparent)
+ rtexture_t *detailtexture;
// total frames in sequence and alternate sequence
int anim_total[2];
float st[2];
// lightmap coordinates
float uv[2];
+ // detail texture coordinates
+ float ab[2];
}
surfvertex_t;
{
// should be drawn if visframe == r_framecount (set by WorldNode functions)
int visframe;
+ // should be drawn if onscreen and not a backface (used for setting visframe)
+ int pvsframe;
+ // chain of surfaces marked visible by pvs
+ struct msurface_s *pvschain;
// the node plane this is on, backwards if SURF_PLANEBACK flag set
mplane_t *plane;
// no texcoord info (that can be generated from these)
int poly_numverts;
float *poly_verts;
+ // bounding box for onscreen checks, and center for sorting
+ vec3_t poly_mins, poly_maxs, poly_center;
// these are regenerated every frame
// lighting info
int lightframe;
// only render each surface once
int worldnodeframe;
- // marked when surface is prepared for the frame
- int insertframe;
// these cause lightmap updates if regenerated
// values currently used in lightmap
#define SHADERSTAGE_NORMAL 1
#define SHADERSTAGE_COUNT 2
+struct entity_render_s;
// change this stuff when real shaders are added
typedef struct Cshader_s
{
- void (*shaderfunc[SHADERSTAGE_COUNT])(msurface_t *firstsurf);
+ void (*shaderfunc[SHADERSTAGE_COUNT])(const struct entity_render_s *ent, const msurface_t *firstsurf);
// list of surfaces using this shader (used during surface rendering)
msurface_t *chain;
}
vec3_t maxs;
// leaf specific
- int visframe; // visible if current (r_framecount)
+ int pvsframe; // potentially visible if current (r_pvsframecount)
int worldnodeframe; // used by certain worldnode variants to avoid processing the same leaf twice in a frame
int portalmarkid; // used by polygon-through-portals visibility checker
- // LordHavoc: leaf based dynamic lighting
- int dlightbits[8];
- int dlightframe;
-
qbyte *compressed_vis;
msurface_t **firstmarksurface;
struct model_s;
void Mod_LoadBrushModel (struct model_s *mod, void *buffer);
void Mod_BrushInit(void);
+
void Mod_FindNonSolidLocation(vec3_t pos, struct model_s *mod);
+mleaf_t *Mod_PointInLeaf (const float *p, struct model_s *model);
+int Mod_PointContents (const float *p, struct model_s *model);
+qbyte *Mod_LeafPVS (mleaf_t *leaf, struct model_s *model);
#endif