vbo: assorted minor clean-ups
Use GL_TRUE/FALSE instead of 1/0. Remove extraneous parentheses. Remove trailing whitespace.
This commit is contained in:
parent
2a429f9d9c
commit
ffe529352b
|
@ -100,7 +100,7 @@ void vbo_exec_invalidate_state( struct gl_context *ctx, GLuint new_state )
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_state & _NEW_EVAL)
|
if (new_state & _NEW_EVAL)
|
||||||
exec->eval.recalculate_maps = 1;
|
exec->eval.recalculate_maps = GL_TRUE;
|
||||||
|
|
||||||
_ae_invalidate_state(ctx, new_state);
|
_ae_invalidate_state(ctx, new_state);
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ void vbo_exec_eval_update( struct vbo_exec_context *exec )
|
||||||
else if (ctx->Eval.Map2Vertex3)
|
else if (ctx->Eval.Map2Vertex3)
|
||||||
set_active_eval2( exec, VBO_ATTRIB_POS, 3, &ctx->EvalMap.Map2Vertex3 );
|
set_active_eval2( exec, VBO_ATTRIB_POS, 3, &ctx->EvalMap.Map2Vertex3 );
|
||||||
|
|
||||||
exec->eval.recalculate_maps = 0;
|
exec->eval.recalculate_maps = GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ struct vbo_save_copied_vtx {
|
||||||
struct vbo_save_vertex_list {
|
struct vbo_save_vertex_list {
|
||||||
GLubyte attrsz[VBO_ATTRIB_MAX];
|
GLubyte attrsz[VBO_ATTRIB_MAX];
|
||||||
GLenum attrtype[VBO_ATTRIB_MAX];
|
GLenum attrtype[VBO_ATTRIB_MAX];
|
||||||
GLuint vertex_size;
|
GLuint vertex_size; /**< size in GLfloats */
|
||||||
|
|
||||||
/* Copy of the final vertex from node->vertex_store->bufferobj.
|
/* Copy of the final vertex from node->vertex_store->bufferobj.
|
||||||
* Keep this in regular (non-VBO) memory to avoid repeated
|
* Keep this in regular (non-VBO) memory to avoid repeated
|
||||||
|
|
|
@ -289,15 +289,15 @@ _save_reset_counters(struct gl_context *ctx)
|
||||||
assert(save->buffer == save->buffer_ptr);
|
assert(save->buffer == save->buffer_ptr);
|
||||||
|
|
||||||
if (save->vertex_size)
|
if (save->vertex_size)
|
||||||
save->max_vert = ((VBO_SAVE_BUFFER_SIZE - save->vertex_store->used) /
|
save->max_vert = (VBO_SAVE_BUFFER_SIZE - save->vertex_store->used) /
|
||||||
save->vertex_size);
|
save->vertex_size;
|
||||||
else
|
else
|
||||||
save->max_vert = 0;
|
save->max_vert = 0;
|
||||||
|
|
||||||
save->vert_count = 0;
|
save->vert_count = 0;
|
||||||
save->prim_count = 0;
|
save->prim_count = 0;
|
||||||
save->prim_max = VBO_SAVE_PRIM_SIZE - save->prim_store->used;
|
save->prim_max = VBO_SAVE_PRIM_SIZE - save->prim_store->used;
|
||||||
save->dangling_attr_ref = 0;
|
save->dangling_attr_ref = GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -856,7 +856,7 @@ dlist_fallback(struct gl_context *ctx)
|
||||||
* unfortunately, otherwise this primitive won't be handled
|
* unfortunately, otherwise this primitive won't be handled
|
||||||
* properly:
|
* properly:
|
||||||
*/
|
*/
|
||||||
save->dangling_attr_ref = 1;
|
save->dangling_attr_ref = GL_TRUE;
|
||||||
|
|
||||||
_save_compile_vertex_list(ctx);
|
_save_compile_vertex_list(ctx);
|
||||||
}
|
}
|
||||||
|
@ -1433,13 +1433,13 @@ vbo_save_EndList(struct gl_context *ctx)
|
||||||
GLint i = save->prim_count - 1;
|
GLint i = save->prim_count - 1;
|
||||||
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
|
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
|
||||||
save->prim[i].end = 0;
|
save->prim[i].end = 0;
|
||||||
save->prim[i].count = (save->vert_count - save->prim[i].start);
|
save->prim[i].count = save->vert_count - save->prim[i].start;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure this vertex list gets replayed by the "loopback"
|
/* Make sure this vertex list gets replayed by the "loopback"
|
||||||
* mechanism:
|
* mechanism:
|
||||||
*/
|
*/
|
||||||
save->dangling_attr_ref = 1;
|
save->dangling_attr_ref = GL_TRUE;
|
||||||
vbo_save_SaveFlushVertices(ctx);
|
vbo_save_SaveFlushVertices(ctx);
|
||||||
|
|
||||||
/* Swap out this vertex format while outside begin/end. Any color,
|
/* Swap out this vertex format while outside begin/end. Any color,
|
||||||
|
|
Loading…
Reference in New Issue