#include "main/glheader.h"
#include "main/light.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "util/simple_list.h"
#include "main/mtypes.h"
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLfloat shininess;
-
+
shininess = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SHININESS][0];
if (!tnl->_ShineTable[0] || tnl->_ShineTable[0]->shininess != shininess)
validate_shine_table( ctx, 0, shininess );
/* increment src vertex color pointer */
STRIDE_F(store->mat[i].ptr, store->mat[i].stride);
}
-
+
/* recompute derived light/material values */
_mesa_update_material( ctx, store->mat_bitmask );
/* XXX we should only call this if we're tracking/changing the specular
struct vertex_buffer *VB, struct light_stage_data *store)
{
GLuint i;
-
+
store->mat_count = 0;
store->mat_bitmask = 0;
}
-static GLboolean run_lighting( struct gl_context *ctx,
+static GLboolean run_lighting( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct light_stage_data *store = LIGHT_STAGE_DATA(stage);
*/
_mesa_vector4f_clean_elem(&store->Input, VB->Count, 2);
}
-
+
if (input->size <= 1) {
/* Clean y.
*/
input = &store->Input;
}
-
+
idx = 0;
if (prepare_materials( ctx, VB, store ))
idx |= LIGHT_TWOSIDE;
/* The individual functions know about replaying side-effects
- * vs. full re-execution.
+ * vs. full re-execution.
*/
store->light_func_tab[idx]( ctx, VB, stage, input );