wine/dlls/opengl32
Zhiyi Zhang ceefcca7ad winemac.drv: Update OpenGL context immediately after the window content view is visible.
Fix errors such as GL_FRAMEBUFFER_UNDEFINED and GL_INVALID_FRAMEBUFFER_OPERATION for OpenGL
functions when the default framebuffer 0 is bound on macOS.

These errors happen because the NSOpenGLContext doesn't have a view bound at the time of an
OpenGL call. The view could not be set for the NSOpenGLContext because the window or view can
still be invisible. Setting an invisible view for the NSOpenGLContext can generate invalid
drawable messages as 682ed910 has shown. Thus setting the view could be deferred because
the NSOpenGLContext needs a visible view.

However, right after the window becomes visible, an OpenGL function that involves the default
framebuffer can be called. And when the view is still not set at the time of the OpenGL call,
errors such as GL_FRAMEBUFFER_UNDEFINED and GL_INVALID_FRAMEBUFFER_OPERATION could happen and
result in rendering errors such as black screen. So we need to set the view for the NSOpenGLContext
as soon as the view becomes visible.

It's possible that the window and view are still invisible when OpenGL functions involving the
default framebuffer get called. In such cases, I think errors like GL_FRAMEBUFFER_UNDEFINED are
justified on macOS.

Fix Active Trader Pro black screen at launch on macOS. The application creates a d3d9 device with
an invisible window. And then it shows the window before calling d3d9_swapchain_Present(). So all
the [NSOpenGLContext setView] opportunities are missed and no view is set. Then when glBlitFramebuffer()
gets called, GL_FRAMEBUFFER_UNDEFINED happens and so nothing is rendered. The application only
renders one frame before login so the window remains black.
2024-04-11 09:00:34 -05:00
..
tests winemac.drv: Update OpenGL context immediately after the window content view is visible. 2024-04-11 09:00:34 -05:00
make_opengl opengl32: Remove DECLSPEC_HIDDEN usage. 2023-11-10 20:52:28 +01:00
Makefile.in makefiles: Always use the global SOURCES variable for .rc files. 2023-11-01 22:43:56 +01:00
opengl32.spec
private.h opengl32: Remove DECLSPEC_HIDDEN usage. 2023-11-10 20:52:28 +01:00
thunks.c opengl32: Remove DECLSPEC_HIDDEN usage. 2023-11-10 20:52:28 +01:00
unix_private.h opengl32: Remove DECLSPEC_HIDDEN usage. 2023-11-10 20:52:28 +01:00
unix_thunks.c opengl32: Remove DECLSPEC_HIDDEN usage. 2023-11-10 20:52:28 +01:00
unix_wgl.c opengl32: Replace sprintf with snprintf/asprintf to avoid deprecation warnings on macOS. 2024-03-11 21:22:41 +01:00
unixlib.h
version.rc Update copyright info for 2024. 2024-01-01 20:15:23 +01:00
wgl.c include: Add a typedef for user callback function pointers. 2024-01-22 11:26:56 +01:00
winegl.xml