void _math_init( void ) { _math_init_transformation(); _math_init_translate(); _math_init_eval(); }
GLboolean _tnl_CreateContext( GLcontext *ctx ) { TNLcontext *tnl; /* Create the TNLcontext structure */ ctx->swtnl_context = tnl = (TNLcontext *) CALLOC( sizeof(TNLcontext) ); if (!tnl) { return GL_FALSE; } /* Initialize the VB. */ tnl->vb.Size = ctx->Const.MaxArrayLockSize + MAX_CLIPPED_VERTICES; /* Initialize tnl state. */ if (ctx->VertexProgram._MaintainTnlProgram) { _tnl_install_pipeline( ctx, _tnl_vp_pipeline ); } else { _tnl_install_pipeline( ctx, _tnl_default_pipeline ); } tnl->NeedNdcCoords = GL_TRUE; tnl->AllowVertexFog = GL_TRUE; tnl->AllowPixelFog = GL_TRUE; /* Set a few default values in the driver struct. */ tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; tnl->Driver.NotifyMaterialChange = _mesa_validate_all_lighting_tables; tnl->nr_blocks = 0; /* plug in the VBO drawing function */ vbo_set_draw_func(ctx, _tnl_vbo_draw_prims); _math_init_transformation(); _math_init_translate(); return GL_TRUE; }