diff options
author | Ian Romanick <[email protected]> | 2012-07-28 15:20:48 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-29 15:09:36 -0700 |
commit | a010215463c63680c69e90202fe3fcd2e5b25fa6 (patch) | |
tree | 202346e7f12fd759cce2f72d5f96371d4c2768e5 /src/mesa/vbo | |
parent | fc2219e4482c4b940ea32dbe8ad220a22c300f3d (diff) |
mesa: Kill ES2 wrapper functions
v2: Fix completely broken condition around ClearColorIiEXT and
ClearColorIuiEXT.
v3: Add special VertexAttrib handling for ES2.
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r-- | src/mesa/vbo/vbo_exec_api.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index a97f8d7f3b4..781e360d269 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -898,6 +898,7 @@ vbo_exec_PrimitiveRestartNV(void) static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec ) { + struct gl_context *ctx = exec->ctx; GLvertexformat *vfmt = &exec->vtxfmt; _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); @@ -946,14 +947,25 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec ) vfmt->Vertex4f = vbo_Vertex4f; vfmt->Vertex4fv = vbo_Vertex4fv; - vfmt->VertexAttrib1fARB = vbo_VertexAttrib1fARB; - vfmt->VertexAttrib1fvARB = vbo_VertexAttrib1fvARB; - vfmt->VertexAttrib2fARB = vbo_VertexAttrib2fARB; - vfmt->VertexAttrib2fvARB = vbo_VertexAttrib2fvARB; - vfmt->VertexAttrib3fARB = vbo_VertexAttrib3fARB; - vfmt->VertexAttrib3fvARB = vbo_VertexAttrib3fvARB; - vfmt->VertexAttrib4fARB = vbo_VertexAttrib4fARB; - vfmt->VertexAttrib4fvARB = vbo_VertexAttrib4fvARB; + if (ctx->API == API_OPENGLES2) { + vfmt->VertexAttrib1fARB = _es_VertexAttrib1f; + vfmt->VertexAttrib1fvARB = _es_VertexAttrib1fv; + vfmt->VertexAttrib2fARB = _es_VertexAttrib2f; + vfmt->VertexAttrib2fvARB = _es_VertexAttrib2fv; + vfmt->VertexAttrib3fARB = _es_VertexAttrib3f; + vfmt->VertexAttrib3fvARB = _es_VertexAttrib3fv; + vfmt->VertexAttrib4fARB = _es_VertexAttrib4f; + vfmt->VertexAttrib4fvARB = _es_VertexAttrib4fv; + } else { + vfmt->VertexAttrib1fARB = vbo_VertexAttrib1fARB; + vfmt->VertexAttrib1fvARB = vbo_VertexAttrib1fvARB; + vfmt->VertexAttrib2fARB = vbo_VertexAttrib2fARB; + vfmt->VertexAttrib2fvARB = vbo_VertexAttrib2fvARB; + vfmt->VertexAttrib3fARB = vbo_VertexAttrib3fARB; + vfmt->VertexAttrib3fvARB = vbo_VertexAttrib3fvARB; + vfmt->VertexAttrib4fARB = vbo_VertexAttrib4fARB; + vfmt->VertexAttrib4fvARB = vbo_VertexAttrib4fvARB; + } vfmt->VertexAttrib1fNV = vbo_VertexAttrib1fNV; vfmt->VertexAttrib1fvNV = vbo_VertexAttrib1fvNV; |