diff options
author | Tim Angus <tim@ngus.net> | 2013-01-24 22:53:08 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-02-16 21:53:37 +0000 |
commit | 980a331cec780fe0b2a860517d02a2566eb7451c (patch) | |
tree | a57f0d76da9177fdfbf4af1ffde730084507c682 /src/rend2/tr_scene.c | |
parent | b236ff1748a52589237e3ae7506ef9969cf6ad44 (diff) |
Remove the SMP renderer feature
Diffstat (limited to 'src/rend2/tr_scene.c')
-rw-r--r-- | src/rend2/tr_scene.c | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/src/rend2/tr_scene.c b/src/rend2/tr_scene.c index f134c997..c7a414f2 100644 --- a/src/rend2/tr_scene.c +++ b/src/rend2/tr_scene.c @@ -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; @@ -148,11 +140,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 ) ); @@ -234,13 +226,13 @@ 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; #ifdef REACTION // JBravo: Mirrored models CrossProduct(ent->axis[0], ent->axis[1], cross); - backEndData[tr.smpFrame]->entities[r_numentities].mirrored = (DotProduct(ent->axis[2], cross) < 0.f); + backEndData->entities[r_numentities].mirrored = (DotProduct(ent->axis[2], cross) < 0.f); #endif r_numentities++; @@ -269,7 +261,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; @@ -439,19 +431,19 @@ 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]; tr.refdef.num_pshadows = 0; - tr.refdef.pshadows = &backEndData[tr.smpFrame]->pshadows[0]; + tr.refdef.pshadows = &backEndData->pshadows[0]; // turn off dynamic lighting globally by clearing all the // dlights if it needs to be disabled or if vertex lighting is enabled |