-/* $Id: context.c,v 1.101 2000/10/30 18:50:42 keithw Exp $ */
+/* $Id: context.c,v 1.102 2000/10/31 18:09:44 keithw Exp $ */
/*
* Mesa 3-D graphics library
#include "matrix.h"
#include "mem.h"
#include "mmath.h"
-#include "pb.h"
#include "pipeline.h"
#include "shade.h"
#include "simple_list.h"
#include "vbxform.h"
#include "vertices.h"
#include "xform.h"
+#include "swrast/swrast.h"
#endif
#if defined(MESA_TRACE)
gl_init_clip();
gl_init_eval();
- _mesa_init_fog();
_mesa_init_math();
gl_init_lists();
gl_init_shade();
return GL_FALSE;
}
ctx->input = ctx->VB->IM;
-
- ctx->PB = gl_alloc_pb();
- if (!ctx->PB) {
+
+ if (!_swrast_create_context( ctx )) {
ALIGN_FREE( ctx->VB );
return GL_FALSE;
}
ctx->Shared = alloc_shared_state();
if (!ctx->Shared) {
ALIGN_FREE( ctx->VB );
- FREE( ctx->PB );
+ _swrast_destroy_context( ctx );
return GL_FALSE;
}
}
if (!alloc_proxy_textures(ctx)) {
free_shared_state(ctx, ctx->Shared);
ALIGN_FREE( ctx->VB );
- FREE( ctx->PB );
+ _swrast_destroy_context( ctx );
return GL_FALSE;
}
if (!ctx->Exec || !ctx->Save) {
free_shared_state(ctx, ctx->Shared);
ALIGN_FREE( ctx->VB );
- FREE( ctx->PB );
+ _swrast_destroy_context( ctx );
if (ctx->Exec)
FREE( ctx->Exec );
}
if (!(ctx->TraceCtx)) {
free_shared_state(ctx, ctx->Shared);
ALIGN_FREE( ctx->VB );
- FREE( ctx->PB );
+ _swrast_destroy_context( ctx );
FREE( ctx->Exec );
FREE( ctx->Save );
return GL_FALSE;
if (!(ctx->TraceCtx)) {
free_shared_state(ctx, ctx->Shared);
ALIGN_FREE( ctx->VB );
- FREE( ctx->PB );
+ _swrast_destroy_context( ctx );
FREE( ctx->Exec );
FREE( ctx->Save );
FREE( ctx->TraceCtx );
}
}
- FREE( ctx->PB );
+ _swrast_destroy_context( ctx );
if (ctx->input != ctx->VB->IM)
gl_immediate_free( ctx->input );