SDL Forum Index
SDL
Simple DirectMedia Layer Forums
Reply to topic
SDL SURFACE QUERY
jyoti
Guest

Reply with quote
Hi

I m new to sdl. I m trying sum basic things like I wish to make a surface on a
bigger surface and change the color of the smaller surface to red.

I used following code for smaller surface:

Surface = SDL_CreateRGBSurface(SDL_SWSURFACE, rect.w, rect.h,
32,0xff000000,0xff000000,0xff000000,0xffffffff);
SDL_FillRect(Surface, NULL, SDL_MapRGB(m_pSurface->format, 255, 0,0));
SDL_Flip(pSurface);


but the color is not getting set. pls help.
SDL SURFACE QUERY
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic