const GLuint nr = VB->Count;
- (void) nstride;
- (void) vstride;
-
#ifdef TRACE
fprintf(stderr, "%s\n", __FUNCTION__ );
#endif
if (stage->changed_inputs == 0)
return;
+ store->LitColor[0].stride = 16;
+ store->LitColor[1].stride = 16;
+
for (j = 0; j < nr; j++,STRIDE_F(vertex,vstride),STRIDE_F(normal,nstride)) {
GLfloat sum[2][3], spec[2][3];
struct gl_light *light;
fprintf(stderr, "%s\n", __FUNCTION__ );
#endif
- (void) nstride;
- (void) vstride;
-
VB->ColorPtr[0] = &store->LitColor[0];
sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
if (stage->changed_inputs == 0)
return;
+ store->LitColor[0].stride = 16;
+ store->LitColor[1].stride = 16;
+
for (j = 0; j < nr; j++,STRIDE_F(vertex,vstride),STRIDE_F(normal,nstride)) {
GLfloat sum[2][3];
struct gl_light *light;
const struct gl_light *light = ctx->Light.EnabledList.next;
GLuint j = 0;
GLfloat base[2][4];
+#if IDX & LIGHT_MATERIAL
const GLuint nr = VB->Count;
+#else
+ const GLuint nr = VB->NormalPtr->count;
+#endif
#ifdef TRACE
fprintf(stderr, "%s\n", __FUNCTION__ );
#endif
(void) input; /* doesn't refer to Eye or Obj */
- (void) nr;
- (void) nstride;
VB->ColorPtr[0] = &store->LitColor[0];
#if IDX & LIGHT_TWOSIDE
if (stage->changed_inputs == 0)
return;
+ if (nr > 1) {
+ store->LitColor[0].stride = 16;
+ store->LitColor[1].stride = 16;
+ }
+ else {
+ store->LitColor[0].stride = 0;
+ store->LitColor[1].stride = 0;
+ }
+
for (j = 0; j < nr; j++, STRIDE_F(normal,nstride)) {
GLfloat n_dot_VP;
GLfloat (*Bcolor)[4] = (GLfloat (*)[4]) store->LitColor[1].data;
#endif
GLuint j = 0;
+#if IDX & LIGHT_MATERIAL
const GLuint nr = VB->Count;
+#else
+ const GLuint nr = VB->NormalPtr->count;
+#endif
const struct gl_light *light;
#ifdef TRACE
#endif
(void) input;
- (void) nr;
- (void) nstride;
sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
if (stage->changed_inputs == 0)
return;
+ if (nr > 1) {
+ store->LitColor[0].stride = 16;
+ store->LitColor[1].stride = 16;
+ }
+ else {
+ store->LitColor[0].stride = 0;
+ store->LitColor[1].stride = 0;
+ }
+
for (j = 0; j < nr; j++, STRIDE_F(normal,nstride)) {
GLfloat sum[2][3];
fprintf(stderr, "%s\n", __FUNCTION__ );
#endif
- (void) nstride;
- (void) vstride;
-
VB->IndexPtr[0] = &store->LitIndex[0];
#if IDX & LIGHT_TWOSIDE
VB->IndexPtr[1] = &store->LitIndex[1];
else
lengths = VB->NormalLengthPtr;
- /* If there is only one normal, don't transform it multiple times:
- */
- if (VB->NormalPtr->stride == 0)
- VB->NormalPtr->count = 1;
-
store->NormalTransform( ctx->ModelviewMatrixStack.Top,
ctx->_ModelViewInvScale,
VB->NormalPtr, /* input normals */
lengths,
&store->normal ); /* resulting normals */
- if (VB->NormalPtr->stride == 0) {
- VB->NormalPtr->count = VB->Count;
+ if (VB->NormalPtr->count > 1) {
+ store->normal.stride = 16;
+ }
+ else {
store->normal.stride = 0;
}
- else
- store->normal.stride = 16;
}
VB->NormalPtr = &store->normal;