| 273 | } |
| 274 | |
| 275 | void circle(GLuint tex, float x, float y, float r, float tx, float ty, float tr, int subdiv) |
| 276 | { |
| 277 | glBindTexture(GL_TEXTURE_2D, tex); |
| 278 | glBegin(GL_TRIANGLE_FAN); |
| 279 | glTexCoord2f(tx, ty); |
| 280 | glVertex2f(x, y); |
| 281 | loopi(subdiv+1) |
| 282 | { |
| 283 | float c = cosf(PI2 * i / float(subdiv)), s = sinf(PI2 * i / float(subdiv)); |
| 284 | glTexCoord2f(tx + tr*c, ty + tr*s); |
| 285 | glVertex2f(x + r*c, y + r*s); |
| 286 | } |
| 287 | glEnd(); |
| 288 | xtraverts += subdiv+2; |
| 289 | } |
| 290 | |
| 291 | void dot(int x, int y, float z) |
| 292 | { |
no test coverage detected