| 439 | // DGL specific, build-specific fallback resize |
| 440 | |
| 441 | void puglFallbackOnResize(PuglView* const view, const uint width, const uint height) |
| 442 | { |
| 443 | #ifdef DGL_OPENGL |
| 444 | #if defined(DGL_USE_OPENGL3) |
| 445 | glViewport(0, 0, static_cast<GLsizei>(width), static_cast<GLsizei>(height)); |
| 446 | #else |
| 447 | glEnable(GL_BLEND); |
| 448 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
| 449 | glViewport(0, 0, static_cast<GLsizei>(width), static_cast<GLsizei>(height)); |
| 450 | glMatrixMode(GL_PROJECTION); |
| 451 | glLoadIdentity(); |
| 452 | glOrtho(0.0, static_cast<GLdouble>(width), static_cast<GLdouble>(height), 0.0, 0.0, 1.0); |
| 453 | glViewport(0, 0, static_cast<GLsizei>(width), static_cast<GLsizei>(height)); |
| 454 | glMatrixMode(GL_MODELVIEW); |
| 455 | glLoadIdentity(); |
| 456 | #endif |
| 457 | #else |
| 458 | // unused |
| 459 | (void)view; |
| 460 | (void)width; |
| 461 | (void)height; |
| 462 | #endif |
| 463 | } |
| 464 | |
| 465 | // -------------------------------------------------------------------------------------------------------------------- |
| 466 |
no outgoing calls
no test coverage detected