New vbo_set_draw_func() to keep vbo context opaque to state tracker and tnl module.
[mesa.git] / src / mesa / tnl / t_context.c
index 60770a91c2cc2e601782907fd0f66cb28fcfed50..0ace5c2d6f182f9994cf2189d2c10b48cafc1b4f 100644 (file)
@@ -61,9 +61,6 @@ _tnl_CreateContext( GLcontext *ctx )
    /* Initialize tnl state.
     */
    if (ctx->VertexProgram._MaintainTnlProgram) {
-#if 0
-      _tnl_ProgramCacheInit( ctx );
-#endif
       _tnl_install_pipeline( ctx, _tnl_vp_pipeline );
    } else {
       _tnl_install_pipeline( ctx, _tnl_default_pipeline );
@@ -81,6 +78,9 @@ _tnl_CreateContext( GLcontext *ctx )
 
    tnl->nr_blocks = 0;
 
+   /* plug in the VBO drawing function */
+   vbo_set_draw_func(ctx, _tnl_draw_prims);
+
    return GL_TRUE;
 }
 
@@ -92,11 +92,6 @@ _tnl_DestroyContext( GLcontext *ctx )
 
    _tnl_destroy_pipeline( ctx );
 
-#if 0
-   if (ctx->VertexProgram._MaintainTnlProgram)
-      _tnl_ProgramCacheDestroy( ctx );
-#endif
-
    FREE(tnl);
    ctx->swtnl_context = NULL;
 }