glsl: signal that the program needs to be re-translated when samplers change
[mesa.git] / src / mesa / tnl / t_vb_cull.c
index 3f12945707fcb987cd7f5c8047d86207b5cdd3c7..712901acf3020a38c90d737fe43da0618fffcc8a 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.1
+ * Version:  6.5
  *
- * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  */
 
 
-#include "glheader.h"
-#include "colormac.h"
-#include "context.h"
-#include "macros.h"
-#include "imports.h"
-#include "mtypes.h"
+#include "main/glheader.h"
+#include "main/colormac.h"
+#include "main/context.h"
+#include "main/macros.h"
+#include "main/imports.h"
+#include "main/mtypes.h"
 
 #include "math/m_xform.h"
 
@@ -52,12 +52,12 @@ static GLboolean run_cull_stage( GLcontext *ctx,
    const GLfloat a = ctx->Transform.CullObjPos[0];
    const GLfloat b = ctx->Transform.CullObjPos[1];
    const GLfloat c = ctx->Transform.CullObjPos[2];
-   GLfloat *norm = (GLfloat *)VB->NormalPtr->data;
-   GLuint stride = VB->NormalPtr->stride;
+   GLfloat *norm = (GLfloat *)VB->AttribPtr[_TNL_ATTRIB_NORMAL]->data;
+   GLuint stride = VB->AttribPtr[_TNL_ATTRIB_NORMAL]->stride;
    GLuint count = VB->Count;
    GLuint i;
 
-   if (ctx->VertexProgram._Enabled ||
+   if (ctx->VertexProgram._Current ||
        !ctx->Transform.CullVertexFlag) 
       return GL_TRUE;