#include "vbo_context.h"
-static GLuint check_size( const GLfloat *attr )
+static GLuint
+check_size(const GLfloat *attr)
{
- if (attr[3] != 1.0F) return 4;
- if (attr[2] != 0.0F) return 3;
- if (attr[1] != 0.0F) return 2;
- return 1;
+ if (attr[3] != 1.0F)
+ return 4;
+ if (attr[2] != 0.0F)
+ return 3;
+ if (attr[1] != 0.0F)
+ return 2;
+ return 1;
}
* Set up the vbo->currval arrays to point at the context's current
* vertex attributes (with strides = 0).
*/
-static void init_legacy_currval(struct gl_context *ctx)
+static void
+init_legacy_currval(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
GLuint i;
}
-static void init_generic_currval(struct gl_context *ctx)
+static void
+init_generic_currval(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
GLuint i;
}
-static void init_mat_currval(struct gl_context *ctx)
+static void
+init_mat_currval(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
GLuint i;
}
-GLboolean _vbo_CreateContext( struct gl_context *ctx )
+GLboolean
+_vbo_CreateContext(struct gl_context *ctx)
{
struct vbo_context *vbo = CALLOC_STRUCT(vbo_context);
/* Initialize the arrayelt helper
*/
if (!ctx->aelt_context &&
- !_ae_create_context( ctx )) {
+ !_ae_create_context(ctx)) {
return GL_FALSE;
}
- init_legacy_currval( ctx );
- init_generic_currval( ctx );
- init_mat_currval( ctx );
+ init_legacy_currval(ctx);
+ init_generic_currval(ctx);
+ init_mat_currval(ctx);
vbo_set_indirect_draw_func(ctx, vbo_draw_indirect_prims);
/* Build mappings from VERT_ATTRIB -> VBO_ATTRIB depending on type
STATIC_ASSERT(VBO_ATTRIB_MAX <= 255);
/* identity mapping */
- for (i = 0; i < ARRAY_SIZE(vbo->map_vp_none); i++)
- vbo->map_vp_none[i] = 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 < MAT_ATTRIB_MAX; i++)
- vbo->map_vp_none[VERT_ATTRIB_GENERIC(i)]
+ vbo->map_vp_none[VERT_ATTRIB_GENERIC(i)]
= VBO_ATTRIB_MAT_FRONT_AMBIENT + i;
for (i = 0; i < ARRAY_SIZE(vbo->map_vp_arb); i++)
- vbo->map_vp_arb[i] = i;
+ vbo->map_vp_arb[i] = i;
}
* will pretty much be permanently installed, which means that the
* vtxfmt mechanism can be removed now.
*/
- vbo_exec_init( ctx );
+ vbo_exec_init(ctx);
if (ctx->API == API_OPENGL_COMPAT)
- vbo_save_init( ctx );
+ vbo_save_init(ctx);
_math_init_eval();
}
-void _vbo_DestroyContext( struct gl_context *ctx )
+void
+_vbo_DestroyContext(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
if (ctx->aelt_context) {
- _ae_destroy_context( ctx );
+ _ae_destroy_context(ctx);
ctx->aelt_context = NULL;
}
}
-void vbo_set_draw_func(struct gl_context *ctx, vbo_draw_func func)
+void
+vbo_set_draw_func(struct gl_context *ctx, vbo_draw_func func)
{
struct vbo_context *vbo = vbo_context(ctx);
vbo->draw_prims = func;
}
-void vbo_set_indirect_draw_func(struct gl_context *ctx,
- vbo_indirect_draw_func func)
+void
+vbo_set_indirect_draw_func(struct gl_context *ctx,
+ vbo_indirect_draw_func func)
{
struct vbo_context *vbo = vbo_context(ctx);
vbo->draw_indirect_prims = func;