summaryrefslogtreecommitdiff
path: root/src/renderergl2
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2013-06-20 16:22:40 -0500
committerTim Angus <tim@ngus.net>2014-06-17 17:43:32 +0100
commit0f76e330757dfab0f3e4cb5bb9dd4566a5397ba7 (patch)
tree5fb0ff512669e5492ca277052715b1b52a01193d /src/renderergl2
parent220ed5a8b8c16059a56abb605f8ec054f1620a6b (diff)
Fix r_nocurves in OpenGL2 renderer
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)
Diffstat (limited to 'src/renderergl2')
-rw-r--r--src/renderergl2/tr_world.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/renderergl2/tr_world.c b/src/renderergl2/tr_world.c
index e88521d6..a6bb310b 100644
--- a/src/renderergl2/tr_world.c
+++ b/src/renderergl2/tr_world.c
@@ -37,6 +37,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
@@ -555,7 +559,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;