Why my MTKview is drawn like if there is a dark ov

2020-08-01 04:43发布

I'm under macOS and I create an MTKView, and I set this MTKView as a subview of the ContentView of my NSWindow.

when I'm inside my MTKView.drawRect method and when I call NSView(Super).getRectsBeingDrawn it returns me nothing! why?

But my main problem is that the MTKView is drawn darker (like there is something darker on the top of it)

enter image description here

I must have something like this instead:

enter image description here

Any idea what can cause this darker effect?

0条回答
登录 后发表回答