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

Function loopi

source/src/rendergl.cpp:336–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334 }
335
336 loopi(cols)
337 {
338 float xtexcut = 0.0f;
339 float xboxcut = 0.0f;
340 if((i+1)*texw>x2-x1)
341 {
342 xboxcut = (float)(((i+1)*texw)-(x2-x1));
343 xtexcut = (float)(((i+1)*texw)-(x2-x1))/texw;
344 }
345
346 glBegin(GL_TRIANGLE_STRIP);
347 glTexCoord2f(0, 0); glVertex2f((float)x1+texw*i, (float)y1+texh*j);
348 glTexCoord2f(1-xtexcut, 0); glVertex2f(x1+texw*(i+1)-xboxcut, (float)y1+texh*j);
349 glTexCoord2f(0, 1-ytexcut); glVertex2f((float)x1+texw*i, y1+texh*(j+1)-yboxcut);
350 glTexCoord2f(1-xtexcut, 1-ytexcut); glVertex2f(x1+texw*(i+1)-xboxcut, (float)y1+texh*(j+1)-yboxcut);
351 glEnd();
352 }
353 }
354
355 if(!c) glEnable(GL_BLEND);

Callers 4

circleFunction · 0.70
fixresizedscreenFunction · 0.70
recomputecameraFunction · 0.70
genclipmatrixFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected