ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static GLboolean run_normal_stage ( GLcontext *  ctx,
struct tnl_pipeline_stage stage 
) [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;
}

Generated on Thu May 24 2012 04:59:35 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.