X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fvtxfmt.c;h=81bf4c589eac28057ad965a64dbcaac6038fbeec;hb=7c16552f8dcc869b14cf7ef443a1b5de83b07973;hp=db389a573f957d8255b937a474fe42de1e192633;hpb=49993a1a9dc34b78ccd345b91087385917a40138;p=mesa.git diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index db389a573f9..81bf4c589ea 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -1,6 +1,5 @@ /* * Mesa 3-D graphics library - * Version: 6.3 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -23,7 +22,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell Gareth Hughes + * Keith Whitwell Gareth Hughes */ #include "glheader.h" @@ -39,14 +38,12 @@ /** - * Use the per-vertex functions found in to initialize the given - * API dispatch table. - * If beginend is true, only plug in the functions which are legal - * between glBegin/glEnd. + * Copy the functions found in the GLvertexformat object into the + * dispatch table. */ static void install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, - const GLvertexformat *vfmt, bool beginend) + const GLvertexformat *vfmt) { assert(ctx->Version > 0); @@ -63,7 +60,7 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, } if (ctx->API == API_OPENGL_COMPAT) { - _mesa_install_eval_vtxfmt(tab, vfmt, beginend); + _mesa_install_eval_vtxfmt(tab, vfmt); } if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) { @@ -112,8 +109,6 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, SET_Begin(tab, vfmt->Begin); SET_End(tab, vfmt->End); SET_PrimitiveRestartNV(tab, vfmt->PrimitiveRestartNV); - - SET_Rectf(tab, vfmt->Rectf); } /* Originally for GL_NV_vertex_program, this is also used by dlist.c */ @@ -211,6 +206,18 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, SET_VertexAttribP3uiv(tab, vfmt->VertexAttribP3uiv); SET_VertexAttribP4uiv(tab, vfmt->VertexAttribP4uiv); } + + if (ctx->API == API_OPENGL_CORE) { + SET_VertexAttribL1d(tab, vfmt->VertexAttribL1d); + SET_VertexAttribL2d(tab, vfmt->VertexAttribL2d); + SET_VertexAttribL3d(tab, vfmt->VertexAttribL3d); + SET_VertexAttribL4d(tab, vfmt->VertexAttribL4d); + + SET_VertexAttribL1dv(tab, vfmt->VertexAttribL1dv); + SET_VertexAttribL2dv(tab, vfmt->VertexAttribL2dv); + SET_VertexAttribL3dv(tab, vfmt->VertexAttribL3dv); + SET_VertexAttribL4dv(tab, vfmt->VertexAttribL4dv); + } } @@ -220,9 +227,9 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, void _mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt) { - install_vtxfmt(ctx, ctx->Exec, vfmt, false); + install_vtxfmt(ctx, ctx->Exec, vfmt); if (ctx->BeginEnd) - install_vtxfmt(ctx, ctx->BeginEnd, vfmt, true); + install_vtxfmt(ctx, ctx->BeginEnd, vfmt); } @@ -234,7 +241,7 @@ void _mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt) { if (_mesa_is_desktop_gl(ctx)) - install_vtxfmt(ctx, ctx->Save, vfmt, false); + install_vtxfmt(ctx, ctx->Save, vfmt); }