tnl: add check for conditional rendering
authorBrian Paul <brianp@vmware.com>
Thu, 31 Dec 2009 04:40:03 +0000 (21:40 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 31 Dec 2009 15:49:26 +0000 (08:49 -0700)
src/mesa/tnl/t_draw.c

index 1c7c733883c1c56630e6f3db14be8b5f75efc690..d31b29b9b40b193187edbd6db903ab2a98c5936e 100644 (file)
@@ -26,6 +26,7 @@
  */
 
 #include "main/glheader.h"
+#include "main/condrender.h"
 #include "main/context.h"
 #include "main/imports.h"
 #include "main/state.h"
@@ -386,6 +387,9 @@ void _tnl_draw_prims( GLcontext *ctx,
    GLuint max_basevertex = prim->basevertex;
    GLuint i;
 
+   if (!_mesa_check_conditional_render(ctx))
+      return; /* don't draw */
+
    for (i = 1; i < nr_prims; i++)
       max_basevertex = MAX2(max_basevertex, prim[i].basevertex);