| 369 | int iDivUp(int a, int b) { return (a % b != 0) ? (a / b + 1) : (a / b); } |
| 370 | |
| 371 | void reshape(int w, int h) |
| 372 | { |
| 373 | width = w; |
| 374 | height = h; |
| 375 | initPixelBuffer(); |
| 376 | |
| 377 | // calculate new grid size |
| 378 | gridSize = dim3(iDivUp(width, blockSize.x), iDivUp(height, blockSize.y)); |
| 379 | |
| 380 | glViewport(0, 0, w, h); |
| 381 | |
| 382 | glMatrixMode(GL_MODELVIEW); |
| 383 | glLoadIdentity(); |
| 384 | |
| 385 | glMatrixMode(GL_PROJECTION); |
| 386 | glLoadIdentity(); |
| 387 | glOrtho(0.0, 1.0, 0.0, 1.0, 0.0, 1.0); |
| 388 | } |
| 389 | |
| 390 | void cleanup() |
| 391 | { |
nothing calls this directly
no test coverage detected