Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 51 of file t_vb_normals.c.
{ struct normal_stage_data *store = NORMAL_STAGE_DATA(stage); struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; const GLfloat *lengths; if (!store->NormalTransform) return GL_TRUE; /* We can only use the display list's saved normal lengths if we've * got a transformation matrix with uniform scaling. */ if (_math_matrix_is_general_scale(ctx->ModelviewMatrixStack.Top)) lengths = NULL; else lengths = VB->NormalLengthPtr; store->NormalTransform( ctx->ModelviewMatrixStack.Top, ctx->_ModelViewInvScale, VB->AttribPtr[_TNL_ATTRIB_NORMAL], /* input normals */ lengths, &store->normal ); /* resulting normals */ if (VB->AttribPtr[_TNL_ATTRIB_NORMAL]->count > 1) { store->normal.stride = 4 * sizeof(GLfloat); } else { store->normal.stride = 0; } VB->AttribPtr[_TNL_ATTRIB_NORMAL] = &store->normal; VB->NormalPtr = &store->normal; VB->NormalLengthPtr = NULL; /* no longer valid */ return GL_TRUE; }