View Full Version : SDL Surfaces

07-05-2009, 01:33 PM
I'm just getting into SDL to display some simple graphics, but I have a few questions. The first is about surfaces. I have a function which will blit a surface to the screen, with the offsets and this works fine. I wondered if it was possible to blit a surface to another surface (after all.. screen is just a surface right?) and then blit the second surface to the screen and flip all the surfaces. I had a go at writing something like this and got segmentation errors followed by the program crashing. Maybe this isn't possible?

Secondly, I was wondering about menus built in to the window. Like "File" at the top of the browser. I've been able to do this with Windows coding and I wanted to do it with SDL seeing as I now, almost exclusively, use Linux. I had a quick Google search and it seems I'd need a library to do this, or have to write my own function. Is this correct?

Thanks for any help :)