/* This must be done after extensions are initialized to enable persistent
* mappings immediately.
*/
- _vbo_CreateContext(ctx, true);
+ _vbo_CreateContext(ctx);
_mesa_initialize_dispatch_tables(ctx);
_mesa_initialize_vbo_vtxfmt(ctx);
};
GLboolean
-_vbo_CreateContext(struct gl_context *ctx, bool use_buffer_objects);
+_vbo_CreateContext(struct gl_context *ctx);
void
_vbo_DestroyContext(struct gl_context *ctx);
GLboolean
-_vbo_CreateContext(struct gl_context *ctx, bool use_buffer_objects)
+_vbo_CreateContext(struct gl_context *ctx)
{
struct vbo_context *vbo = &ctx->vbo_context;
* will pretty much be permanently installed, which means that the
* vtxfmt mechanism can be removed now.
*/
- vbo_exec_init(ctx, use_buffer_objects);
+ vbo_exec_init(ctx);
if (ctx->API == API_OPENGL_COMPAT)
vbo_save_init(ctx);
void
-vbo_exec_init(struct gl_context *ctx, bool use_buffer_objects)
+vbo_exec_init(struct gl_context *ctx)
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
- vbo_exec_vtx_init(exec, use_buffer_objects);
+ vbo_exec_vtx_init(exec);
ctx->Driver.NeedFlush = 0;
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
#include "vbo_attrib.h"
void
-vbo_exec_init(struct gl_context *ctx, bool use_buffer_objects);
+vbo_exec_init(struct gl_context *ctx);
void
vbo_exec_destroy(struct gl_context *ctx);
void
-vbo_exec_vtx_init(struct vbo_exec_context *exec, bool use_buffer_objects);
+vbo_exec_vtx_init(struct vbo_exec_context *exec);
void
vbo_exec_vtx_destroy(struct vbo_exec_context *exec);
void
-vbo_exec_vtx_init(struct vbo_exec_context *exec, bool use_buffer_objects)
+vbo_exec_vtx_init(struct vbo_exec_context *exec)
{
struct gl_context *ctx = gl_context_from_vbo_exec(exec);
- if (use_buffer_objects) {
- /* Use buffer objects for immediate mode. */
- struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
- exec->vtx.bufferobj = ctx->Driver.NewBufferObject(ctx, IMM_BUFFER_NAME);
- } else {
- /* Use allocated memory for immediate mode. */
- exec->vtx.bufferobj = NULL;
- exec->vtx.buffer_map =
- align_malloc(ctx->Const.glBeginEndBufferSize, 64);
- exec->vtx.buffer_ptr = exec->vtx.buffer_map;
- }
+ exec->vtx.bufferobj = ctx->Driver.NewBufferObject(ctx, IMM_BUFFER_NAME);
vbo_exec_vtxfmt_init(exec);
_mesa_noop_vtxfmt_init(ctx, &exec->vtxfmt_noop);