mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- restored screen clear in Cocoa backend when setting video mode
This still doesn't work well in windowed mode In fullscreen the effect is quite noticeable thought
This commit is contained in:
parent
1ccbbcb81d
commit
53bf598aee
1 changed files with 11 additions and 0 deletions
|
@ -355,6 +355,9 @@ SystemGLFrameBuffer::SystemGLFrameBuffer(void*, const bool fullscreen)
|
|||
assert(frameBuffer == nullptr);
|
||||
frameBuffer = this;
|
||||
|
||||
// To be able to use OpenGL functions in SetMode()
|
||||
ogl_LoadFunctions();
|
||||
|
||||
FConsoleWindow::GetInstance().Show(false);
|
||||
}
|
||||
|
||||
|
@ -527,6 +530,14 @@ void SystemGLFrameBuffer::SetMode(const bool fullscreen, const bool hiDPI)
|
|||
SetWindowedMode();
|
||||
}
|
||||
|
||||
const NSSize viewSize = I_GetContentViewSize(m_window);
|
||||
|
||||
glViewport(0, 0, static_cast<GLsizei>(viewSize.width), static_cast<GLsizei>(viewSize.height));
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
[[NSOpenGLContext currentContext] flushBuffer];
|
||||
|
||||
[m_window updateTitle];
|
||||
|
||||
if (![m_window isKeyWindow])
|
||||
|
|
Loading…
Reference in a new issue