summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_exec_api.c28
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;