/*
* Mesa 3-D graphics library
- * Version: 6.3
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
- * Keith Whitwell <keith@tungstengraphics.com>
+ * Keith Whitwell <keithw@vmware.com>
*/
#include "main/imports.h"
static GLuint check_size( const GLfloat *attr )
{
- if (attr[3] != 1.0) return 4;
- if (attr[2] != 0.0) return 3;
- if (attr[1] != 0.0) return 2;
+ if (attr[3] != 1.0F) return 4;
+ if (attr[2] != 0.0F) return 3;
+ if (attr[1] != 0.0F) return 2;
return 1;
}
&vbo->currval[VBO_ATTRIB_MAT_FRONT_AMBIENT];
GLuint i;
- ASSERT(NR_MAT_ATTRIBS == MAT_ATTRIB_MAX);
+ assert(NR_MAT_ATTRIBS == MAT_ATTRIB_MAX);
memset(arrays, 0, sizeof(*arrays) * NR_MAT_ATTRIBS);
{
struct vbo_context *vbo = CALLOC_STRUCT(vbo_context);
- ctx->swtnl_im = (void *)vbo;
+ ctx->vbo_context = vbo;
/* Initialize the arrayelt helper
*/
GLuint i;
/* identity mapping */
- for (i = 0; i < Elements(vbo->map_vp_none); i++)
+ for (i = 0; i < ARRAY_SIZE(vbo->map_vp_none); i++)
vbo->map_vp_none[i] = i;
/* map material attribs to generic slots */
for (i = 0; i < NR_MAT_ATTRIBS; i++)
vbo->map_vp_none[VERT_ATTRIB_GENERIC(i)]
= VBO_ATTRIB_MAT_FRONT_AMBIENT + i;
- for (i = 0; i < Elements(vbo->map_vp_arb); i++)
+ for (i = 0; i < ARRAY_SIZE(vbo->map_vp_arb); i++)
vbo->map_vp_arb[i] = i;
}
if (ctx->API == API_OPENGL_COMPAT)
vbo_save_destroy(ctx);
free(vbo);
- ctx->swtnl_im = NULL;
+ ctx->vbo_context = NULL;
}
}