rxi / microui

A tiny immediate-mode UI library
MIT License
3.29k stars 239 forks source link

Why is black area covering gui appearing after resizing window? #49

Closed tomaszte closed 3 years ago

tomaszte commented 3 years ago

Hello, I have changed the demo code so it allows window resizing, but when I'm resizing window part of the window contents is being covered by black rectangle.

Screenshots below show the problem: first one is how it looks after program started second and third are after resizing window to make it bigger.

Can you please help me understand why is that black rectangle appearing?

This is how I implemented resizing: https://github.com/tomaszte/microui/commit/d975c07eb59521ce692029387454a478969b7507

Image 1 Image 1 Image 1

tomaszte commented 3 years ago

It was caused by glEnable(GL_SCISSOR_TEST) being enabled all the time. It looks like it has to be disabled for resizing and then reenabled for drawing gui.