diff options
author | marha <marha@users.sourceforge.net> | 2012-11-05 07:36:16 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-11-05 07:36:16 +0100 |
commit | 1cc98f5a48924d750fbef7ea6b05a1ba49c28589 (patch) | |
tree | 24c2eebc8ef3536e89b355b099d844083646d190 /mesalib/src/mesa/main/vtxfmt.c | |
parent | 67c290de36ddc1caae94c0892157ac16b90e4f99 (diff) | |
download | vcxsrv-1cc98f5a48924d750fbef7ea6b05a1ba49c28589.tar.gz vcxsrv-1cc98f5a48924d750fbef7ea6b05a1ba49c28589.tar.bz2 vcxsrv-1cc98f5a48924d750fbef7ea6b05a1ba49c28589.zip |
xserver mesa xkbcomp git update 5 nov 2012
xserver: a194630f7f7b287cb4ea4a459df0745f4c0d4c1a
mesa: ccbfe3dde94cd50a4e6468cfeabf95c79c9d8072
xkbcomp: a68c5b7b29eb1433b1be73b50c4248e10eab8e64
Diffstat (limited to 'mesalib/src/mesa/main/vtxfmt.c')
-rw-r--r-- | mesalib/src/mesa/main/vtxfmt.c | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/mesalib/src/mesa/main/vtxfmt.c b/mesalib/src/mesa/main/vtxfmt.c index 462cc8849..5891a5231 100644 --- a/mesalib/src/mesa/main/vtxfmt.c +++ b/mesalib/src/mesa/main/vtxfmt.c @@ -47,10 +47,13 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, const GLvertexformat *vfmt) { if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) { + SET_Color4f(tab, vfmt->Color4f); + } + + if (ctx->API == API_OPENGL) { _mesa_install_arrayelt_vtxfmt(tab, vfmt); SET_Color3f(tab, vfmt->Color3f); SET_Color3fv(tab, vfmt->Color3fv); - SET_Color4f(tab, vfmt->Color4f); SET_Color4fv(tab, vfmt->Color4fv); SET_EdgeFlag(tab, vfmt->EdgeFlag); } @@ -60,21 +63,27 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, } if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) { + SET_Materialfv(tab, vfmt->Materialfv); + SET_MultiTexCoord4fARB(tab, vfmt->MultiTexCoord4fARB); + SET_Normal3f(tab, vfmt->Normal3f); + } + + if (ctx->API == API_OPENGL) { SET_FogCoordfEXT(tab, vfmt->FogCoordfEXT); SET_FogCoordfvEXT(tab, vfmt->FogCoordfvEXT); SET_Indexf(tab, vfmt->Indexf); SET_Indexfv(tab, vfmt->Indexfv); - SET_Materialfv(tab, vfmt->Materialfv); SET_MultiTexCoord1fARB(tab, vfmt->MultiTexCoord1fARB); SET_MultiTexCoord1fvARB(tab, vfmt->MultiTexCoord1fvARB); SET_MultiTexCoord2fARB(tab, vfmt->MultiTexCoord2fARB); SET_MultiTexCoord2fvARB(tab, vfmt->MultiTexCoord2fvARB); SET_MultiTexCoord3fARB(tab, vfmt->MultiTexCoord3fARB); SET_MultiTexCoord3fvARB(tab, vfmt->MultiTexCoord3fvARB); - SET_MultiTexCoord4fARB(tab, vfmt->MultiTexCoord4fARB); SET_MultiTexCoord4fvARB(tab, vfmt->MultiTexCoord4fvARB); - SET_Normal3f(tab, vfmt->Normal3f); SET_Normal3fv(tab, vfmt->Normal3fv); + } + + if (ctx->API == API_OPENGL) { SET_SecondaryColor3fEXT(tab, vfmt->SecondaryColor3fEXT); SET_SecondaryColor3fvEXT(tab, vfmt->SecondaryColor3fvEXT); SET_TexCoord1f(tab, vfmt->TexCoord1f); @@ -105,13 +114,13 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, SET_DrawArrays(tab, vfmt->DrawArrays); SET_DrawElements(tab, vfmt->DrawElements); - if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) { + if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) { SET_DrawRangeElements(tab, vfmt->DrawRangeElements); } SET_MultiDrawElementsEXT(tab, vfmt->MultiDrawElementsEXT); - if (ctx->API != API_OPENGLES2) { + if (_mesa_is_desktop_gl(ctx)) { SET_DrawElementsBaseVertex(tab, vfmt->DrawElementsBaseVertex); SET_DrawRangeElementsBaseVertex(tab, vfmt->DrawRangeElementsBaseVertex); SET_MultiDrawElementsBaseVertex(tab, vfmt->MultiDrawElementsBaseVertex); @@ -121,12 +130,12 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, SET_DrawElementsInstancedBaseVertexBaseInstance(tab, vfmt->DrawElementsInstancedBaseVertexBaseInstance); } - if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) { + if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) { SET_DrawArraysInstancedARB(tab, vfmt->DrawArraysInstanced); SET_DrawElementsInstancedARB(tab, vfmt->DrawElementsInstanced); } - if (ctx->API != API_OPENGLES2) { + if (_mesa_is_desktop_gl(ctx)) { SET_DrawTransformFeedback(tab, vfmt->DrawTransformFeedback); SET_DrawTransformFeedbackStream(tab, vfmt->DrawTransformFeedbackStream); SET_DrawTransformFeedbackInstanced(tab, @@ -147,17 +156,19 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, SET_VertexAttrib4fvNV(tab, vfmt->VertexAttrib4fvNV); } - SET_VertexAttrib1fARB(tab, vfmt->VertexAttrib1fARB); - SET_VertexAttrib1fvARB(tab, vfmt->VertexAttrib1fvARB); - SET_VertexAttrib2fARB(tab, vfmt->VertexAttrib2fARB); - SET_VertexAttrib2fvARB(tab, vfmt->VertexAttrib2fvARB); - SET_VertexAttrib3fARB(tab, vfmt->VertexAttrib3fARB); - SET_VertexAttrib3fvARB(tab, vfmt->VertexAttrib3fvARB); - SET_VertexAttrib4fARB(tab, vfmt->VertexAttrib4fARB); - SET_VertexAttrib4fvARB(tab, vfmt->VertexAttrib4fvARB); + if (ctx->API != API_OPENGLES) { + SET_VertexAttrib1fARB(tab, vfmt->VertexAttrib1fARB); + SET_VertexAttrib1fvARB(tab, vfmt->VertexAttrib1fvARB); + SET_VertexAttrib2fARB(tab, vfmt->VertexAttrib2fARB); + SET_VertexAttrib2fvARB(tab, vfmt->VertexAttrib2fvARB); + SET_VertexAttrib3fARB(tab, vfmt->VertexAttrib3fARB); + SET_VertexAttrib3fvARB(tab, vfmt->VertexAttrib3fvARB); + SET_VertexAttrib4fARB(tab, vfmt->VertexAttrib4fARB); + SET_VertexAttrib4fvARB(tab, vfmt->VertexAttrib4fvARB); + } /* GL_EXT_gpu_shader4 / OpenGL 3.0 */ - if (ctx->API != API_OPENGLES2) { + if (_mesa_is_desktop_gl(ctx)) { SET_VertexAttribI1iEXT(tab, vfmt->VertexAttribI1i); SET_VertexAttribI2iEXT(tab, vfmt->VertexAttribI2i); SET_VertexAttribI3iEXT(tab, vfmt->VertexAttribI3i); @@ -171,14 +182,14 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, SET_VertexAttribI3uivEXT(tab, vfmt->VertexAttribI3uiv); } - if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) { + if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) { SET_VertexAttribI4iEXT(tab, vfmt->VertexAttribI4i); SET_VertexAttribI4ivEXT(tab, vfmt->VertexAttribI4iv); SET_VertexAttribI4uiEXT(tab, vfmt->VertexAttribI4ui); SET_VertexAttribI4uivEXT(tab, vfmt->VertexAttribI4uiv); } - if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) { + if (ctx->API == API_OPENGL) { /* GL_ARB_vertex_type_10_10_10_2_rev / GL 3.3 */ SET_VertexP2ui(tab, vfmt->VertexP2ui); SET_VertexP2uiv(tab, vfmt->VertexP2uiv); @@ -217,7 +228,7 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, SET_SecondaryColorP3uiv(tab, vfmt->SecondaryColorP3uiv); } - if (ctx->API != API_OPENGLES2) { + if (_mesa_is_desktop_gl(ctx)) { SET_VertexAttribP1ui(tab, vfmt->VertexAttribP1ui); SET_VertexAttribP2ui(tab, vfmt->VertexAttribP2ui); SET_VertexAttribP3ui(tab, vfmt->VertexAttribP3ui); |