GtkGlArea makes the entire window black in macOS
Steps to reproduce
- Dependencies installed with Homebrew bottles.
- Clone gtk and checkout gtk-3-24 branch.
- Compile gtk and run gtk3-demo.
Current behavior
The GlArea demo window is black. The gtk package from Homebrew suffers from this too.
Version information
- GTK 3-24 branch
- macOS 10.14 mojave
- MacBook Pro, Intel graphics card, Retina display
Additional information
I inserted a one-shot call to NSOpenGLContext::update()
just before
NSOpenGLContext::updateBuffer()
, and added a timer to repeatedly
request repaint.
Then the window rendering alternates with each repaint: black, normal, black, normal...
Insert glClear
with red color just before updateBuffer
, the window still gets painted black every other time.
apitrace
shows that GL api calls are exactly the same with each repaint. Except that the IOSurface
addresses used to setup a texture (inside the updateBuffer()
call) are mostly different each time.