There was some discussion regarding capturing resizing data of sdl window.
For example, if the resize was captured during PollEvent, there would be a momentarily freeze. This is due to OS blocking during PollEvent.
There were two choices given to this. Either use “main callbacks” or use SetEventFilter to make the callback that looks for EVENT_WINDOW_EXPOSED events.
If I want to capture .WINDOW_RESIZED width and height, how should it be set up in Odin?
But essentially you want to give it a structure which includes the window width and height and any other data you need for rendering, then inside the function check for the event type you want, I also wanted to render while moving the window and render then.
It basically does the same thing, but still stalls at the beginning of resizing.
The document says that:
SDL_EVENT_WINDOW_EXPOSED Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event. data1 is 1 for live-resize expose events, 0 otherwise.