- // Blending aktiv sowie eine gebundene Texture
- GLsizei vertexStride = (GLsizei)header->vertexStride;
- glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, GL_FLOAT, vertexStride, header->vertices);
- assert(header->texcoords != header->vertices);
- GLsizei texcoordStride = (GLsizei)header->texcoordStride;
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glVertexPointer(2, GL_FLOAT, texcoordStride, header->texcoords);
- assert(header->colors != header->vertices);
- GLsizei colorStride = (GLsizei)header->colorStride;
- glEnableClientState(GL_COLOR_ARRAY);
- glColorPointer(4, GL_FLOAT, colorStride, header->colors);
- size_t indexSize = vertexIndexArray->indexSize;
- GLenum type = indexSize == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT;
- glDrawElements(primitiveType, (GLsizei)vertexIndexArrayDraw->count, type, vertexIndexArray->indices);
- glDisableClientState(GL_COLOR_ARRAY);
- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- glDisableClientState(GL_VERTEX_ARRAY);