/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5
*
- * Copyright (C) 1999-2005 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 "light.h"
-#include "macros.h"
-#include "imports.h"
-#include "simple_list.h"
-#include "mtypes.h"
+#include "main/glheader.h"
+#include "main/colormac.h"
+#include "main/light.h"
+#include "main/macros.h"
+#include "main/imports.h"
+#include "main/simple_list.h"
+#include "main/mtypes.h"
#include "math/m_translate.h"
* update_materials(), above, that'll actually copy the vertex color to
* the material attribute(s).
*/
- for (i = _TNL_ATTRIB_MAT_FRONT_AMBIENT ; i < _TNL_ATTRIB_INDEX ; i++) {
+ for (i = _TNL_FIRST_MAT; i <= _TNL_LAST_MAT; i++) {
if (VB->AttribPtr[i]->stride) {
const GLuint j = store->mat_count++;
const GLuint attr = i - _TNL_ATTRIB_MAT_FRONT_AMBIENT;
GLvector4f *input = ctx->_NeedEyeCoords ? VB->EyePtr : VB->ObjPtr;
GLuint idx;
- if (!ctx->Light.Enabled || ctx->VertexProgram._Enabled)
+ if (!ctx->Light.Enabled || ctx->VertexProgram._Current)
return GL_TRUE;
/* Make sure we can talk about position x,y and z:
VB->AttribPtr[_TNL_ATTRIB_COLOR0] = VB->ColorPtr[0];
VB->AttribPtr[_TNL_ATTRIB_COLOR1] = VB->SecondaryColorPtr[0];
- VB->AttribPtr[_TNL_ATTRIB_INDEX] = VB->IndexPtr[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR_INDEX] = VB->IndexPtr[0];
return GL_TRUE;
}
{
light_func *tab;
- if (!ctx->Light.Enabled || ctx->VertexProgram._Enabled)
+ if (!ctx->Light.Enabled || ctx->VertexProgram._Current)
return;
if (ctx->Visual.rgbMode) {