minifb icon indicating copy to clipboard operation
minifb copied to clipboard

Feature request: on expose callback

Open MegaLoler opened this issue 4 years ago • 3 comments

Hi! I love this little library, fast and easy. <3

I was wondering if you would be interested in adding an "on expose" callback, which gets called when the window needs to be redrawn for any reason?

This would be useful for me because with the way I'm using the library, I'm not redrawing the window continuously for continuous animation. Rather, I'm redrawing only when something changes, or perhaps I'm only drawing a single static frame for the lifetime of the window.

Currently, without an "on expose" callback, this leads to an issue, because without redrawing the frame constantly, the window collects artifacts as other items on the screen cover up the contents of the window. It would also be very useful to know when the window has been created and is ready to be drawn for the first time.

MegaLoler avatar Mar 20 '20 18:03 MegaLoler