Remove the SMP renderer feature
This commit is contained in:
parent
3f489fe5f2
commit
51df89ab13
35 changed files with 160 additions and 839 deletions
|
@ -38,20 +38,12 @@ int r_numpolyverts;
|
|||
|
||||
/*
|
||||
====================
|
||||
R_ToggleSmpFrame
|
||||
R_InitNextFrame
|
||||
|
||||
====================
|
||||
*/
|
||||
void R_ToggleSmpFrame( void ) {
|
||||
if ( r_smp->integer ) {
|
||||
// use the other buffers next frame, because another CPU
|
||||
// may still be rendering into the current ones
|
||||
tr.smpFrame ^= 1;
|
||||
} else {
|
||||
tr.smpFrame = 0;
|
||||
}
|
||||
|
||||
backEndData[tr.smpFrame]->commands.used = 0;
|
||||
void R_InitNextFrame( void ) {
|
||||
backEndData->commands.used = 0;
|
||||
|
||||
r_firstSceneDrawSurf = 0;
|
||||
|
||||
|
@ -143,11 +135,11 @@ void RE_AddPolyToScene( qhandle_t hShader, int numVerts, const polyVert_t *verts
|
|||
return;
|
||||
}
|
||||
|
||||
poly = &backEndData[tr.smpFrame]->polys[r_numpolys];
|
||||
poly = &backEndData->polys[r_numpolys];
|
||||
poly->surfaceType = SF_POLY;
|
||||
poly->hShader = hShader;
|
||||
poly->numVerts = numVerts;
|
||||
poly->verts = &backEndData[tr.smpFrame]->polyVerts[r_numpolyverts];
|
||||
poly->verts = &backEndData->polyVerts[r_numpolyverts];
|
||||
|
||||
Com_Memcpy( poly->verts, &verts[numVerts*j], numVerts * sizeof( *verts ) );
|
||||
|
||||
|
@ -224,8 +216,8 @@ void RE_AddRefEntityToScene( const refEntity_t *ent ) {
|
|||
ri.Error( ERR_DROP, "RE_AddRefEntityToScene: bad reType %i", ent->reType );
|
||||
}
|
||||
|
||||
backEndData[tr.smpFrame]->entities[r_numentities].e = *ent;
|
||||
backEndData[tr.smpFrame]->entities[r_numentities].lightingCalculated = qfalse;
|
||||
backEndData->entities[r_numentities].e = *ent;
|
||||
backEndData->entities[r_numentities].lightingCalculated = qfalse;
|
||||
|
||||
r_numentities++;
|
||||
}
|
||||
|
@ -253,7 +245,7 @@ void RE_AddDynamicLightToScene( const vec3_t org, float intensity, float r, floa
|
|||
if ( glConfig.hardwareType == GLHW_RIVA128 || glConfig.hardwareType == GLHW_PERMEDIA2 ) {
|
||||
return;
|
||||
}
|
||||
dl = &backEndData[tr.smpFrame]->dlights[r_numdlights++];
|
||||
dl = &backEndData->dlights[r_numdlights++];
|
||||
VectorCopy (org, dl->origin);
|
||||
dl->radius = intensity;
|
||||
dl->color[0] = r;
|
||||
|
@ -355,16 +347,16 @@ void RE_RenderScene( const refdef_t *fd ) {
|
|||
tr.refdef.floatTime = tr.refdef.time * 0.001f;
|
||||
|
||||
tr.refdef.numDrawSurfs = r_firstSceneDrawSurf;
|
||||
tr.refdef.drawSurfs = backEndData[tr.smpFrame]->drawSurfs;
|
||||
tr.refdef.drawSurfs = backEndData->drawSurfs;
|
||||
|
||||
tr.refdef.num_entities = r_numentities - r_firstSceneEntity;
|
||||
tr.refdef.entities = &backEndData[tr.smpFrame]->entities[r_firstSceneEntity];
|
||||
tr.refdef.entities = &backEndData->entities[r_firstSceneEntity];
|
||||
|
||||
tr.refdef.num_dlights = r_numdlights - r_firstSceneDlight;
|
||||
tr.refdef.dlights = &backEndData[tr.smpFrame]->dlights[r_firstSceneDlight];
|
||||
tr.refdef.dlights = &backEndData->dlights[r_firstSceneDlight];
|
||||
|
||||
tr.refdef.numPolys = r_numpolys - r_firstScenePoly;
|
||||
tr.refdef.polys = &backEndData[tr.smpFrame]->polys[r_firstScenePoly];
|
||||
tr.refdef.polys = &backEndData->polys[r_firstScenePoly];
|
||||
|
||||
// turn off dynamic lighting globally by clearing all the
|
||||
// dlights if it needs to be disabled or if vertex lighting is enabled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue