Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Functions | Variables
rendermodel.cpp File Reference
#include <boost/algorithm/clamp.hpp>
#include <math.h>
#include <string.h>
#include <algorithm>
#include <memory>
#include <string>
#include "SDL_opengl.h"
#include "inexor/engine/blob.hpp"
#include "inexor/engine/dynlight.hpp"
#include "inexor/engine/glare.hpp"
#include "inexor/engine/glemu.hpp"
#include "inexor/engine/lightmap.hpp"
#include "inexor/engine/octaedit.hpp"
#include "inexor/engine/octree.hpp"
#include "inexor/engine/pvs.hpp"
#include "inexor/engine/renderbackground.hpp"
#include "inexor/engine/rendergl.hpp"
#include "inexor/engine/renderva.hpp"
#include "inexor/engine/shader.hpp"
#include "inexor/engine/shadowmap.hpp"
#include "inexor/engine/water.hpp"
#include "inexor/fpsgame/client.hpp"
#include "inexor/fpsgame/entities.hpp"
#include "inexor/fpsgame/fps.hpp"
#include "inexor/fpsgame/player.hpp"
#include "inexor/io/Logging.hpp"
#include "inexor/io/filesystem/mediadirs.hpp"
#include "inexor/io/legacy/stream.hpp"
#include "inexor/model/model.hpp"
#include "inexor/model/rendermodel.hpp"
#include "inexor/network/SharedVar.hpp"
#include "inexor/physics/physics.hpp"
#include "inexor/shared/command.hpp"
#include "inexor/shared/cube_formatting.hpp"
#include "inexor/shared/cube_hash.hpp"
#include "inexor/shared/cube_loops.hpp"
#include "inexor/shared/cube_tools.hpp"
#include "inexor/shared/cube_unicode.hpp"
#include "inexor/shared/ents.hpp"
#include "inexor/shared/geom.hpp"
#include "inexor/shared/tools.hpp"
#include "inexor/texture/cubemap.hpp"
#include "inexor/texture/texture.hpp"
#include "inexor/ui/legacy/menus.hpp"
#include "inexor/util/legacy_time.hpp"
#include "inexor/model/animmodel.hpp"
#include "inexor/model/ragdoll.hpp"
#include "inexor/model/skelmodel.hpp"
#include "inexor/model/iqm.hpp"
#include "inexor/model/md2.hpp"
#include "inexor/model/md3.hpp"
#include "inexor/model/md5.hpp"
#include "inexor/model/obj.hpp"
#include "inexor/model/smd.hpp"

Classes

struct  batchedmodel
 
struct  modelbatch
 
struct  transparentmodel
 

Macros

#define MODELTYPE(modeltype, modelclass)
 
#define checkmdl   if(!loadingmodel) { Log.std->error("not loading a model"); return; }
 
#define checkragdoll
 
#define ifnoload(tex, path)   if((tex = textureload(path, 0, true, false))==notexture)
 
#define tryload(tex, prefix, cmd, name)
 

Functions

void loadskin (const char *dir, const char *altdir, Texture *&skin, Texture *&masks)
 
void preloadmodelshaders (bool force)
 
 VAR (oqdynent, 0, 1, 1)
 
 VAR (animationinterpolationtime, 0, 150, 1000)
 
 VARFP (envmapmodels, 0, 1, 1, preloadmodelshaders(true))
 
 VARFP (bumpmodels, 0, 1, 1, preloadmodelshaders(true))
 
 VARP (fullbrightmodels, 0, 0, 200)
 
 VARP (gpuskel, 0, 1, 1)
 
 VAR (maxskelanimdata, 1, 192, 0)
 
 VAR (testtags, 0, 0, 1)
 
static model *__cdeclmodeltypes (const char *)
 
static int addmodeltype (int type, model *(__cdecl *loader)(const char *))
 
 MODELTYPE (MDL_MD2, md2)
 
 MODELTYPE (MDL_MD3, md3)
 
 MODELTYPE (MDL_MD5, md5)
 
 MODELTYPE (MDL_OBJ, obj)
 
 MODELTYPE (MDL_SMD, smd)
 
 MODELTYPE (MDL_IQM, iqm)
 
void mdlcullface (int *cullface)
 
 COMMAND (mdlcullface,"i")
 
void mdlcollide (int *collide)
 
 COMMAND (mdlcollide,"i")
 
void mdlellipsecollide (int *collide)
 
 COMMAND (mdlellipsecollide,"i")
 
void mdlspec (int *percent)
 
 COMMAND (mdlspec,"i")
 
void mdlambient (int *percent)
 
 COMMAND (mdlambient,"i")
 
void mdlalphatest (float *cutoff)
 
 COMMAND (mdlalphatest,"f")
 
void mdlalphablend (int *blend)
 
 COMMAND (mdlalphablend,"i")
 
void mdlalphadepth (int *depth)
 
 COMMAND (mdlalphadepth,"i")
 
void mdldepthoffset (int *offset)
 
 COMMAND (mdldepthoffset,"i")
 
void mdlglow (int *percent, int *delta, float *pulse)
 
 COMMAND (mdlglow,"iif")
 
void mdlglare (float *specglare, float *glowglare)
 
 COMMAND (mdlglare,"ff")
 
void mdlenvmap (float *envmapmax, float *envmapmin, char *envmap)
 
 COMMAND (mdlenvmap,"ffs")
 
void mdlfullbright (float *fullbright)
 
 COMMAND (mdlfullbright,"f")
 
void mdlshader (char *shader)
 
 COMMAND (mdlshader,"s")
 
void mdlspin (float *yaw, float *pitch)
 
 COMMAND (mdlspin,"ff")
 
void mdlscale (int *percent)
 
 COMMAND (mdlscale,"i")
 
void mdltrans (float *x, float *y, float *z)
 
 COMMAND (mdltrans,"fff")
 
void mdlyaw (float *angle)
 
 COMMAND (mdlyaw,"f")
 
void mdlpitch (float *angle)
 
 COMMAND (mdlpitch,"f")
 
void mdlshadow (int *shadow)
 
 COMMAND (mdlshadow,"i")
 
void mdlbb (float *rad, float *h, float *eyeheight)
 
 COMMAND (mdlbb,"fff")
 
void mdlextendbb (float *x, float *y, float *z)
 
 COMMAND (mdlextendbb,"fff")
 
void mdlname ()
 
 COMMAND (mdlname,"")
 
void rdvert (float *x, float *y, float *z, float *radius)
 
 COMMAND (rdvert,"ffff")
 
void rdeye (int *v)
 
 COMMAND (rdeye,"i")
 
void rdtri (int *v1, int *v2, int *v3)
 
 COMMAND (rdtri,"iii")
 
void rdjoint (int *n, int *t, int *v1, int *v2, int *v3)
 
 COMMAND (rdjoint,"iibbb")
 
void rdlimitdist (int *v1, int *v2, float *mindist, float *maxdist)
 
 COMMAND (rdlimitdist,"iiff")
 
void rdlimitrot (int *t1, int *t2, float *maxangle, float *qx, float *qy, float *qz, float *qw)
 
 COMMAND (rdlimitrot,"iifffff")
 
void rdanimjoints (int *on)
 
 COMMAND (rdanimjoints,"i")
 
void mmodel (char *name)
 
void mapmodelcompat (int *rad, int *h, int *tex, char *name, char *shadow)
 
void mapmodelreset (int *n)
 
mapmodelinfogetmminfo (int i)
 
const char * mapmodelname (int i)
 
 COMMAND (mmodel,"s")
 
 COMMANDN (mapmodel, mapmodelcompat,"iiiss")
 
 COMMAND (mapmodelreset,"i")
 
 ICOMMAND (mapmodelname,"i",(int *index),{result(mapmodels.inrange(*index)?mapmodels[*index].name:"");})
 
 ICOMMAND (nummapmodels,"",(),{intret(mapmodels.length());})
 
void preloadmodel (const char *name)
 
void flushpreloadedmodels (bool msg)
 
void preloadusedmapmodels (bool msg, bool bih)
 
modelloadmodel (const char *name, int i, bool msg)
 
void clear_mdls ()
 
void cleanupmodels ()
 
void clearmodel (char *name)
 
 COMMAND (clearmodel,"s")
 
bool modeloccluded (const vec &center, float radius)
 
 VAR (showboundingbox, 0, 0, 2)
 
void render2dbox (vec &o, float x, float y, float z)
 
void render3dbox (vec &o, float tofloor, float toceil, float xradius, float yradius=0)
 
void renderellipse (vec &o, float xradius, float yradius, float yaw)
 
void startmodelbatches ()
 
modelbatchaddbatchedmodel (model *m)
 
void renderbatchedmodel (model *m, batchedmodel &b)
 
static bool sorttransparentmodels (const transparentmodel &x, const transparentmodel &y)
 
void endmodelbatches ()
 
void startmodelquery (occludequery *query)
 
void endmodelquery ()
 
 VAR (maxmodelradiusdistance, 10, 200, 1000)
 
static void enablecullmodelquery ()
 
static void rendercullmodelquery (model *m, dynent *d, const vec &center, float radius)
 
static void disablecullmodelquery ()
 
static int cullmodel (model *m, const vec &center, float radius, int flags, dynent *d=nullptr, bool shadow=false)
 
void rendermodel (entitylight *light, const char *mdl, int anim, const vec &o, float yaw, float pitch, int flags, dynent *d, modelattach *a, int basetime, int basetime2, float trans)
 
void abovemodel (vec &o, const char *mdl)
 
bool matchanim (const char *name, const char *pattern)
 
void findanims (const char *pattern, vector< int > &anims)
 
 ICOMMAND (findanims,"s",(char *name),{vector< int > anims;findanims(name, anims);vector< char > buf;string num;loopv(anims){formatstring(num,"%d", anims[i]);if(i > 0) buf.add(' ');buf.put(num, strlen(num));}buf.add('\0');result(buf.getbuf());})
 
 VAR (animoverride,-1, 0, NUMANIMS-1)
 
 VAR (testanims, 0, 0, 1)
 
 VAR (testpitch,-90, 0, 90)
 
void renderclient (dynent *d, const char *mdlname, modelattach *attachments, int hold, int attack, int attackdelay, int lastaction, int lastpain, float fade, bool ragdoll)
 
void setbbfrommodel (dynent *d, const char *mdl)
 

Variables

modelloadingmodel = nullptr
 
vector< mapmodelinfomapmodels
 
hashnameset< model * > models
 
vector< const char * > preloadmodels
 
vector< std::stringmissingmodels
 
static vector< modelbatch * > batches
 
static vector< modelattachmodelattached
 
static int numbatches = -1
 
static occludequerymodelquery = nullptr
 

Class Documentation

struct batchedmodel
Class Members
int anim
int attached
int basetime
int basetime2
vec color
dynent * d
vec dir
int flags
float pitch
vec pos
occludequery * query
float transparent
float yaw
struct modelbatch
Class Members
vector< batchedmodel > batched
int flags
model * m
struct transparentmodel
Class Members
batchedmodel * batched
float dist
model * m

Macro Definition Documentation

#define checkmdl   if(!loadingmodel) { Log.std->error("not loading a model"); return; }
#define checkragdoll
Value:
if(!loadingmodel->skeletal()) { Log.std->error("not loading a skeletal model"); return; } \
skelmodel *m = (skelmodel *)loadingmodel; \
if(m->parts.empty()) return; \
skelmodel::skelmeshgroup *meshes = (skelmodel::skelmeshgroup *)m->parts.last()->meshes; \
if(!meshes) return; \
skelmodel::skeleton *skel = meshes->skel; \
if(!skel->ragdoll) skel->ragdoll = new ragdollskel; \
ragdollskel *ragdoll = skel->ragdoll; \
if(ragdoll->loaded) return;
virtual bool skeletal() const
Definition: model.hpp:66
Definition: ragdoll.hpp:15
model * loadingmodel
Definition: rendermodel.cpp:56
static Logger std
Logger for everything not fitting elsewhere.
Definition: Logging.hpp:89
inexor::util::log_manager Log
Definition: Logging.cpp:241
if(NOT DEFINED PROJECT_ARCH) message(FATAL_ERROR"You are generating from the wrong folder! \"Where is the Source
Definition: CMakeLists.txt:2
Definition: skelmodel.hpp:1099
Definition: skelmodel.hpp:11

Referenced by rdanimjoints(), rdeye(), rdjoint(), rdlimitdist(), rdlimitrot(), rdtri(), and rdvert().

#define ifnoload (   tex,
  path 
)    if((tex = textureload(path, 0, true, false))==notexture)
#define MODELTYPE (   modeltype,
  modelclass 
)
Value:
static model *__loadmodel__##modelclass(const char *filename) \
{ \
return new modelclass(filename); \
} \
UNUSED static int __dummy__##modelclass = addmodeltype((modeltype), __loadmodel__##modelclass);
static int addmodeltype(int type, model *(__cdecl *loader)(const char *))
Definition: rendermodel.cpp:73
Definition: model.hpp:40
#define UNUSED
Definition: cube_tools.hpp:24
#define tryload (   tex,
  prefix,
  cmd,
  name 
)
Value:
ifnoload(tex, makerelpath(mdir, name ".jpg", prefix, cmd)) \
{ \
ifnoload(tex, makerelpath(mdir, name ".png", prefix, cmd)) \
{ \
ifnoload(tex, makerelpath(maltdir, name ".jpg", prefix, cmd)) \
{ \
ifnoload(tex, makerelpath(maltdir, name ".png", prefix, cmd)) return; \
} \
} \
}
char * makerelpath(const char *dir, const char *file, const char *prefix, const char *cmd)
Append a string together but add the prefix in the field.
Definition: stream.cpp:35
#define ifnoload(tex, path)

Referenced by loadskin().

Function Documentation

void abovemodel ( vec o,
const char *  mdl 
)
modelbatch& addbatchedmodel ( model m)
static int addmodeltype ( int  type,
model __cdecl *loader)(const char * 
)
static

References modeltypes().

void cleanupmodels ( )

References model::cleanup(), and enumerate.

Referenced by resetgl().

void clear_mdls ( )

References enumerate.

Referenced by cleanup().

void clearmodel ( char *  name)
COMMAND ( mdlcullface  ,
"i"   
)
COMMAND ( mdlcollide  ,
"i"   
)
COMMAND ( mdlellipsecollide  ,
"i"   
)
COMMAND ( mdlspec  ,
"i"   
)
COMMAND ( mdlambient  ,
"i"   
)
COMMAND ( mdlalphatest  ,
"f"   
)
COMMAND ( mdlalphablend  ,
"i"   
)
COMMAND ( mdlalphadepth  ,
"i"   
)
COMMAND ( mdldepthoffset  ,
"i"   
)
COMMAND ( mdlglow  ,
"iif"   
)
COMMAND ( mdlglare  ,
"ff"   
)
COMMAND ( mdlenvmap  ,
"ffs"   
)
COMMAND ( mdlfullbright  ,
"f"   
)
COMMAND ( mdlshader  ,
"s"   
)
COMMAND ( mdlspin  ,
"ff"   
)
COMMAND ( mdlscale  ,
"i"   
)
COMMAND ( mdltrans  ,
"fff"   
)
COMMAND ( mdlyaw  ,
"f"   
)
COMMAND ( mdlpitch  ,
"f"   
)
COMMAND ( mdlshadow  ,
"i"   
)
COMMAND ( mdlbb  ,
"fff"   
)
COMMAND ( mdlextendbb  ,
"fff"   
)
COMMAND ( mdlname  ,
""   
)
COMMAND ( rdvert  ,
"ffff"   
)
COMMAND ( rdeye  ,
"i"   
)
COMMAND ( rdtri  ,
"iii"   
)
COMMAND ( rdjoint  ,
"iibbb"   
)
COMMAND ( rdlimitdist  ,
"iiff"   
)
COMMAND ( rdlimitrot  ,
"iifffff"   
)
COMMAND ( rdanimjoints  ,
"i"   
)
COMMAND ( mmodel  ,
"s"   
)
COMMAND ( mapmodelreset  ,
"i"   
)
COMMAND ( clearmodel  ,
"s"   
)
COMMANDN ( mapmodel  ,
mapmodelcompat  ,
"iiiss"   
)
static int cullmodel ( model m,
const vec center,
float  radius,
int  flags,
dynent d = nullptr,
bool  shadow = false 
)
inlinestatic
static void disablecullmodelquery ( )
inlinestatic

References endbb().

Referenced by rendermodel().

static void enablecullmodelquery ( )
inlinestatic

References startbb().

Referenced by rendermodel().

void endmodelbatches ( )
void endmodelquery ( )
void findanims ( const char *  pattern,
vector< int > &  anims 
)
void flushpreloadedmodels ( bool  msg)
mapmodelinfo* getmminfo ( int  i)
ICOMMAND ( mapmodelname  ,
"i"  ,
(int *index ,
{result(mapmodels.inrange(*index)?mapmodels[*index].name:"");}   
)
ICOMMAND ( nummapmodels  ,
""  ,
()  ,
{intret(mapmodels.length());}   
)
ICOMMAND ( findanims  ,
"s"  ,
(char *name)  ,
{vector< int > anims;findanims(name, anims);vector< char > buf;string num;loopv(anims){formatstring(num,"%d", anims[i]);if(i > 0) buf.add(' ');buf.put(num, strlen(num));}buf.add('\0');result(buf.getbuf());}   
)
model* loadmodel ( const char *  name,
int  i,
bool  msg 
)
void loadskin ( const char *  dir,
const char *  altdir,
Texture *&  skin,
Texture *&  masks 
)
void mapmodelcompat ( int *  rad,
int *  h,
int *  tex,
char *  name,
char *  shadow 
)

References mmodel().

const char* mapmodelname ( int  i)
void mapmodelreset ( int *  n)
bool matchanim ( const char *  name,
const char *  pattern 
)

References iscubespace().

Referenced by findanims().

void mdlalphablend ( int *  blend)

References checkmdl, and model::setalphablend().

void mdlalphadepth ( int *  depth)

References model::alphadepth, and checkmdl.

void mdlalphatest ( float *  cutoff)
void mdlambient ( int *  percent)

References checkmdl, and model::setambient().

void mdlbb ( float *  rad,
float *  h,
float *  eyeheight 
)
void mdlcollide ( int *  collide)

References checkmdl, and model::collide.

void mdlcullface ( int *  cullface)

References checkmdl, and model::setcullface().

void mdldepthoffset ( int *  offset)

References checkmdl, and model::depthoffset.

void mdlellipsecollide ( int *  collide)

References checkmdl, and model::ellipsecollide.

void mdlenvmap ( float *  envmapmax,
float *  envmapmin,
char *  envmap 
)
void mdlextendbb ( float *  x,
float *  y,
float *  z 
)

References model::bbextend, and checkmdl.

void mdlfullbright ( float *  fullbright)

References checkmdl, and model::setfullbright().

void mdlglare ( float *  specglare,
float *  glowglare 
)

References checkmdl, and model::setglare().

void mdlglow ( int *  percent,
int *  delta,
float *  pulse 
)

References checkmdl, and model::setglow().

void mdlname ( )
void mdlpitch ( float *  angle)

References checkmdl, and model::offsetpitch.

void mdlscale ( int *  percent)

References checkmdl, and model::scale.

void mdlshader ( char *  shader)
void mdlshadow ( int *  shadow)

References checkmdl, and model::shadow.

void mdlspec ( int *  percent)

References checkmdl, and model::setspec().

void mdlspin ( float *  yaw,
float *  pitch 
)
void mdltrans ( float *  x,
float *  y,
float *  z 
)

References checkmdl, and model::translate.

void mdlyaw ( float *  angle)

References checkmdl, and model::offsetyaw.

void mmodel ( char *  name)
bool modeloccluded ( const vec center,
float  radius 
)

References bboccluded(), and pvsoccluded().

Referenced by cullmodel().

MODELTYPE ( MDL_MD2  ,
md2   
)
MODELTYPE ( MDL_MD3  ,
md3   
)
MODELTYPE ( MDL_MD5  ,
md5   
)
MODELTYPE ( MDL_OBJ  ,
obj   
)
MODELTYPE ( MDL_SMD  ,
smd   
)
MODELTYPE ( MDL_IQM  ,
iqm   
)
static model* __cdecl* modeltypes ( const char *  )
static

Referenced by addmodeltype(), and loadmodel().

void preloadmodel ( const char *  name)
void preloadmodelshaders ( bool  force)
void preloadusedmapmodels ( bool  msg,
bool  bih 
)
void rdanimjoints ( int *  on)

References checkragdoll.

void rdeye ( int *  v)

References checkragdoll.

void rdjoint ( int *  n,
int *  t,
int *  v1,
int *  v2,
int *  v3 
)
void rdlimitdist ( int *  v1,
int *  v2,
float *  mindist,
float *  maxdist 
)
void rdlimitrot ( int *  t1,
int *  t2,
float *  maxangle,
float *  qx,
float *  qy,
float *  qz,
float *  qw 
)
void rdtri ( int *  v1,
int *  v2,
int *  v3 
)
void rdvert ( float *  x,
float *  y,
float *  z,
float *  radius 
)
void render2dbox ( vec o,
float  x,
float  y,
float  z 
)

References gle::begin(), gle::end(), and xtraverts.

Referenced by render3dbox().

void render3dbox ( vec o,
float  tofloor,
float  toceil,
float  xradius,
float  yradius = 0 
)

References vec::add(), render2dbox(), and vec::sub().

Referenced by rendermodel().

void renderbatchedmodel ( model m,
batchedmodel b 
)
void renderclient ( dynent d,
const char *  mdlname,
modelattach attachments,
int  hold,
int  attack,
int  attackdelay,
int  lastaction,
int  lastpain,
float  fade,
bool  ragdoll 
)
static void rendercullmodelquery ( model m,
dynent d,
const vec center,
float  radius 
)
inlinestatic
void renderellipse ( vec o,
float  xradius,
float  yradius,
float  yaw 
)
void rendermodel ( entitylight light,
const char *  mdl,
int  anim,
const vec o,
float  yaw,
float  pitch,
int  flags,
dynent d,
modelattach a,
int  basetime,
int  basetime2,
float  trans 
)

References physent::aboveeye, vector< T, MINSIZE >::add(), vec::add(), addbatchedmodel(), batchedmodel::anim, ANIM_FULLBRIGHT, ANIM_GHOST, ANIM_NORENDER, ANIM_NOSKIN, batchedmodel::attached, batchedmodel::basetime, batchedmodel::basetime2, modelbatch::batched, BLOB_DYNAMIC, BLOB_STATIC, model::boundbox(), ragdolldata::center, model::collisionbox(), entitylight::color, batchedmodel::color, cullmodel(), batchedmodel::d, hmap::d, entitylight::dir, batchedmodel::dir, disablecullmodelquery(), dynlightreaching(), editmode, enablecullmodelquery(), endquery, model::endrender(), ENT_CAMERA, physent::eyeheight, batchedmodel::flags, modelbatch::flags, flushblobs(), glaring, GLOBALPARAMF, lastmillis, vector< T, MINSIZE >::length(), dynent::light, game::lighteffects(), lightreaching(), loadmodel(), modelattach::m, vec::magnitude(), inexor::rpc::max(), MDL_CULL_DIST, MDL_CULL_OCCLUDED, MDL_CULL_QUERY, MDL_CULL_VFC, MDL_DYNLIGHT, MDL_DYNSHADOW, MDL_FULLBRIGHT, MDL_GHOST, MDL_HUD, MDL_LIGHT, MDL_LIGHT_FAST, MDL_NORENDER, MDL_SHADOW, entitylight::millis, modelquery, newquery(), notextureshader, physent::o, OCCLUDE_NOTHING, dynent::occluded, oqfrags, batchedmodel::pitch, batchedmodel::pos, dynent::query, batchedmodel::query, RAD, physent::radius, ragdolldata::radius, dynent::ragdoll, reflecting, reflectz, refracting, model::render(), render3dbox(), renderblob(), rendercullmodelquery(), renderellipse(), vec::rotate_around_z(), rotatebb(), Shader::set(), shadowmap, shadowmapping, showblobs, startquery, model::startrender(), modelattach::tag, batchedmodel::transparent, physent::type, physent::xradius, physent::yaw, batchedmodel::yaw, and physent::yradius.

Referenced by game::drawhudmodel(), gui::modelpreview(), game::renderbouncers(), renderclient(), entities::renderentities(), game::captureclientmode::rendergame(), game::collectclientmode::rendergame(), game::ctfclientmode::rendergame(), rendermapmodel(), game::rendermovables(), game::renderplayer(), game::bombclientmode::renderplayersposindicator(), and game::renderprojectiles().

void setbbfrommodel ( dynent d,
const char *  mdl 
)
static bool sorttransparentmodels ( const transparentmodel x,
const transparentmodel y 
)
inlinestatic

References transparentmodel::dist.

Referenced by endmodelbatches().

void startmodelbatches ( )
void startmodelquery ( occludequery query)

Referenced by rendermapmodels().

VAR ( oqdynent  ,
,
,
 
)
VAR ( animationinterpolationtime  ,
,
150  ,
1000   
)
VAR ( maxskelanimdata  ,
,
192  ,
 
)
VAR ( testtags  ,
,
,
 
)
VAR ( showboundingbox  ,
,
,
 
)
VAR ( maxmodelradiusdistance  ,
10  ,
200  ,
1000   
)
VAR ( animoverride  ,
1,
,
NUMANIMS 1 
)
VAR ( testanims  ,
,
,
 
)
VAR ( testpitch  ,
90,
,
90   
)
VARFP ( envmapmodels  ,
,
,
,
preloadmodelshaders(true)   
)
VARFP ( bumpmodels  ,
,
,
,
preloadmodelshaders(true)   
)
VARP ( fullbrightmodels  ,
,
,
200   
)
VARP ( gpuskel  ,
,
,
 
)

Variable Documentation

vector<modelbatch *> batches
static
model* loadingmodel = nullptr
vector<mapmodelinfo> mapmodels
vector<std::string> missingmodels
vector<modelattach> modelattached
static
occludequery* modelquery = nullptr
static

Referenced by endmodelquery(), and rendermodel().

hashnameset<model *> models
int numbatches = -1
static

Referenced by addbatchedmodel().

vector<const char *> preloadmodels