| 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); |
no outgoing calls
no test coverage detected