WM_PAINT equivalent?

Hello everyone!

A portion of my game (the menu) doesn’t need to be updated on every
cycle. So I thought, why not just update it when the screen needs to be
redrawn? Is there an equivalent to handling Win32’s WM_PAINT in SDL?

Thanks!

The expose event seems to be what you are looking for:
http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fExposeEventOn Feb 10, 2008 9:05 PM, L-28C wrote:

A portion of my game (the menu) doesn’t need to be updated on every
cycle. So I thought, why not just update it when the screen needs to be
redrawn? Is there an equivalent to handling Win32’s WM_PAINT in SDL?

I’ll see how to implement it in my game. Thanks!

Brian wrote:> The expose event seems to be what you are looking for:

http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fExposeEvent

On Feb 10, 2008 9:05 PM, L-28C wrote:

A portion of my game (the menu) doesn’t need to be updated on every
cycle. So I thought, why not just update it when the screen needs to be
redrawn? Is there an equivalent to handling Win32’s WM_PAINT in SDL?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I’ll see how to implement it in my game. Thanks!

Yep, but there’s no equivalent to InvalidateRect() - you’ll just need to
track and draw anything that your application changes.

See ya,
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment