Exemplo n.º 1
0
/**
 * Helper for update_arrays().
 * \return  min(current min, array->_MaxElement).
 */
static GLuint
update_min(GLuint min, struct gl_client_array *array)
{
   compute_max_element(array);
   if (array->Enabled)
      return MIN2(min, array->_MaxElement);
   else
      return min;
}
Exemplo n.º 2
0
/**
 * Examine vertex arrays to update the gl_array_object::_MaxElement field.
 */
void
_mesa_update_array_object_max_element(struct gl_context *ctx,
                                      struct gl_array_object *arrayObj)
{
   GLbitfield64 enabled;

   if (!ctx->VertexProgram._Current ||
       ctx->VertexProgram._Current == ctx->VertexProgram._TnlProgram) {
      enabled = _mesa_array_object_get_enabled_ff(arrayObj);
   } else if (ctx->VertexProgram._Current->IsNVProgram) {
      enabled = _mesa_array_object_get_enabled_nv(arrayObj);
   } else {
      enabled = _mesa_array_object_get_enabled_arb(arrayObj);
   }

   /* _MaxElement is one past the last legal array element */
   arrayObj->_MaxElement = compute_max_element(arrayObj, enabled);
}
Exemplo n.º 3
0
/**
 * Helper for update_arrays().
 * \return  min(current min, array->_MaxElement).
 */
static GLuint
update_min(GLuint min, struct gl_client_array *array)
{
   compute_max_element(array);
   return MIN2(min, array->_MaxElement);
}