Browse Source

Fix full black UI with OpenGL2 on certain hosts

Signed-off-by: falkTX <falktx@falktx.com>
pull/479/merge
falkTX 5 days ago
parent
commit
8d13c168ee
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      dgl/src/OpenGL2.cpp

+ 4
- 2
dgl/src/OpenGL2.cpp View File

@@ -533,8 +533,6 @@ void Window::PrivateData::startContext()
{ {
const PuglArea size = puglGetSizeHint(view, PUGL_CURRENT_SIZE); const PuglArea size = puglGetSizeHint(view, PUGL_CURRENT_SIZE);


glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glViewport(0, 0, static_cast<GLsizei>(size.width), static_cast<GLsizei>(size.height)); glViewport(0, 0, static_cast<GLsizei>(size.width), static_cast<GLsizei>(size.height));
glMatrixMode(GL_PROJECTION); glMatrixMode(GL_PROJECTION);
glLoadIdentity(); glLoadIdentity();
@@ -547,6 +545,10 @@ void Window::PrivateData::startContext()
glViewport(0, 0, static_cast<GLsizei>(size.width), static_cast<GLsizei>(size.height)); glViewport(0, 0, static_cast<GLsizei>(size.width), static_cast<GLsizei>(size.height));
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
glLoadIdentity(); glLoadIdentity();

glColor4f(1.f, 1.f, 1.f, 1.f);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
} }


void Window::PrivateData::endContext() void Window::PrivateData::endContext()


Loading…
Cancel
Save