29 #include "../idlib/precompiled.h"
42 static const char *sprite_SnapshotName =
"_sprite_Snapshot_";
77 if ( renderEntity ==
NULL || viewDef ==
NULL ) {
82 if ( cachedModel !=
NULL ) {
84 assert( dynamic_cast<idRenderModelStatic *>( cachedModel ) !=
NULL );
88 surf = *staticModel->
Surface( 0 );
94 staticModel->
InitEmpty( sprite_SnapshotName );
104 tri->
verts[ 0 ].
st[ 0 ] = 0.0f;
105 tri->
verts[ 0 ].
st[ 1 ] = 0.0f;
111 tri->
verts[ 1 ].
st[ 0 ] = 1.0f;
112 tri->
verts[ 1 ].
st[ 1 ] = 0.0f;
118 tri->
verts[ 2 ].
st[ 0 ] = 1.0f;
119 tri->
verts[ 2 ].
st[ 1 ] = 1.0f;
125 tri->
verts[ 3 ].
st[ 0 ] = 0.0f;
126 tri->
verts[ 3 ].
st[ 1 ] = 1.0f;
192 if ( renderEntity ==
NULL ) {
assert(prefInfo.fullscreenBtn)
ID_INLINE T Max(T x, T y)
void Set(const float x, const float y, const float z)
virtual const modelSurface_t * Surface(int surfaceNum) const
const idMaterial * shader
const int SHADERPARM_SPRITE_WIDTH
const int SHADERPARM_GREEN
virtual const char * Name() const =0
GLclampf GLclampf GLclampf alpha
srfTriangles_t * R_AllocStaticTriSurf(void)
int Icmp(const char *text) const
const int SHADERPARM_ALPHA
const int SHADERPARM_BLUE
virtual void InitEmpty(const char *name)
virtual idRenderModel * InstantiateDynamicModel(const struct renderEntity_s *ent, const struct viewDef_s *view, idRenderModel *cachedModel)
static int FtoiFast(float f)
srfTriangles_t * geometry
void R_BoundTriSurf(srfTriangles_t *tri)
virtual idBounds Bounds(const struct renderEntity_s *ent) const
idCVar r_useCachedDynamicModels("r_useCachedDynamicModels","1", CVAR_RENDERER|CVAR_BOOL,"cache snapshots of dynamic models")
const int SHADERPARM_SPRITE_HEIGHT
virtual bool IsLoaded() const
void R_AllocStaticTriSurfIndexes(srfTriangles_t *tri, int numIndexes)
idBounds & ExpandSelf(const float d)
virtual dynamicModel_t IsDynamicModel() const
void R_AllocStaticTriSurfVerts(srfTriangles_t *tri, int numVerts)
float shaderParms[MAX_ENTITY_SHADER_PARMS]
const idMaterial * defaultMaterial
virtual void AddSurface(modelSurface_t surface)