MCPcopy Create free account
hub / github.com/DISTRHO/DPF / puglFallbackOnResize

Function puglFallbackOnResize

dgl/src/pugl.cpp:441–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439// DGL specific, build-specific fallback resize
440
441void 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

Callers 2

onReshapeMethod · 0.85
fallbackOnResizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected