Skip to main content
gamedev.net
🔒 Locked

Using multiple windows in SDL

Started by silverphyre673 0 replies 300+ views
Original Post
silverphyre673
silverphyre673
Hello all. I'm learning SDL, and making a sort of 2D mapmaker in it. I need to make a toolbar for it, to allow you to select the tiles and objects you want to place visually. I want the toolbar to be a separate window from the one displaying the map. I tried just creating two SDL_Surfaces using SDL_SetVideoMode, and then rendering to one or the other during my rendering procedure. What happens is that both SDL_Surfaces are created, but only the second one created is rendered to. I can see the first one flicker on for a split-second, and then everything gets rendered to the second one (the toolbox), instead of the first. Could someone give an example of how they would accomplish this? Thanks a bunch. I'll post more source if needed. Thanks again.
my siteGenius is 1% inspiration and 99% perspiration

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.