MCPcopy Create free account
hub / github.com/assaultcube/AC / circle

Function circle

source/src/rendergl.cpp:275–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275void 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
291void dot(int x, int y, float z)
292{

Callers 1

drawradar_vicinityFunction · 0.85

Calls 1

loopiFunction · 0.70

Tested by

no test coverage detected