- const Vector4 *v = 0;
- if(t==get_component_type(VERTEX3))
- v = &ver;
- else if(*c>=TEXCOORD1 && *c<=TEXCOORD4+12)
- v = &texc[t-get_component_type(TEXCOORD1)];
- else if(*c>=ATTRIB1)
- v = &attr[t-get_component_type(ATTRIB1)];
- else
- v = &attr[t];
- *ptr++ = v->x;
- if(sz>=2) *ptr++ = v->y;
- if(sz>=3) *ptr++ = v->z;
- if(sz>=4) *ptr++ = v->w;
+ const Vector4 &v = (sem==0 ? vtx : attr[sem]);
+ *ptr++ = v.x;
+ if(sz>=2) *ptr++ = v.y;
+ if(sz>=3) *ptr++ = v.z;
+ if(sz>=4) *ptr++ = v.w;