- Tilemap::Index index = indices[y][x];
-
- if (image.getTileCoords(index, texCoords))
- {
- glBegin(GL_TRIANGLE_FAN);
- glTexCoord2f(texCoords[0], texCoords[1]);
- glVertex2f(xf, yf);
- glTexCoord2f(texCoords[2], texCoords[3]);
- glVertex2f(xf+1.0, yf);
- glTexCoord2f(texCoords[4], texCoords[5]);
- glVertex2f(xf+1.0, yf+1.0);
- glTexCoord2f(texCoords[6], texCoords[7]);
- glVertex2f(xf, yf+1.0);
- glEnd();
- }