sbarisic / NuklearDotNet

.NET binding for the Nuklear immediate mode GUI
Other
186 stars 15 forks source link

IFrameBuffered #16

Closed Donaut closed 4 years ago

Donaut commented 4 years ago

I'm trying to implement the IFrameBuffered interface (It's all good and working :D 👍 ) My only problem is that I need a way to trigger the whole buffering process manually. I need this because it's possible that the Buffer size is going to change at runtime.

sbarisic commented 4 years ago

There is NuklearAPI.QueueForceUpdate() and NuklearDevice.ForceUpdate()

First one enqueues force update to happen in next call to NuklearAPI.Frame, second one immediately enqueues a force update event.

Donaut commented 4 years ago

Looked at the source code and ForceUpdate do nothing! image

sbarisic commented 4 years ago

Yes, but if you put a print statement inside BeginBuffering, you'll see it execute every time you force update. Every time some event happens, the whole GUI redraws, so basically every time you move your mouse or press a key. That's because nuklear was not designed to be used this way, but it works fine.

Donaut commented 4 years ago

Ok. It's finally working the renderer is nicely written and can handle resizing.