Sdl_surface Trouble For Gui Windows


Pickle

Mega GP Mania
Joined
May 30, 2006
Messages
5,527
Location
Detroit, Michigan
Website
Visit site
My basic idea is to take some loaded bitmaps and put them togther to form a window (basically a picture with a border). I want to put all of these bitmaps into a SDL_surface in memory, then when I need the window I only have to blit the final SDL_surface.

Its not working as i expected. I am using SDL_BlitSurface() to put my bitmaps pieces into a empty SDL_surface. Problem is when I blit the final SDL_surface nothing shows up.

My guess is I need to do something with my inbetween SDL_surface other than just:
CODE
SDL_Surface window_surface;

My guess is maybe because im using HW surfaces? Is there a SDL function I should use to setup this SDL_surface?
 
Yes you must call SDL_CreateRGBSurface to init the new surface with proper specs.
 
Back
Top