Skip to content

Commit

Permalink
Fix r_nocurves in OpenGL2 renderer
Browse files Browse the repository at this point in the history
Check r_nocurves in surface cull.
While r_nocurves is enabled, don't use merged surfaces because merged curves would be renderer. (note: surface merging is enabled by r_mergeLeafSurfaces)
  • Loading branch information
zturtleman committed Jun 20, 2013
1 parent 323e8b9 commit 8724655
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/renderergl2/tr_world.c
Expand Up @@ -36,6 +36,10 @@ static qboolean R_CullSurface( msurface_t *surf ) {
return qfalse;
}

if ( *surf->data == SF_GRID && r_nocurves->integer ) {
return qtrue;
}

if (surf->cullinfo.type & CULLINFO_PLANE)
{
// Only true for SF_FACE, so treat like its own function
Expand Down Expand Up @@ -554,7 +558,7 @@ static void R_RecursiveWorldNode( mnode_t *node, int planeBits, int dlightBits,
}

// add merged and unmerged surfaces
if (tr.world->viewSurfaces)
if (tr.world->viewSurfaces && !r_nocurves->integer)
view = tr.world->viewSurfaces + node->firstmarksurface;
else
view = tr.world->marksurfaces + node->firstmarksurface;
Expand Down

0 comments on commit 8724655

Please sign in to comment.