Creating a plain SDL surface?

Started by
0 comments, last by blackcloak 15 years, 8 months ago
Hello! Is there some way to create an SDL surface with a specific width and height, without loading a bitmap or setting the video mode? [Edited by - TriKri on July 29, 2008 8:29:44 AM]
Advertisement
Uint32 rmask, gmask, bmask, amask;	#if SDL_BYTEORDER == SDL_BIG_ENDIAN			rmask = 0xff000000;			gmask = 0x00ff0000;			bmask = 0x0000ff00;			amask = 0x000000ff;		#else			rmask = 0x000000ff;			gmask = 0x0000ff00;			bmask = 0x00ff0000;			amask = 0xff000000;		#endifSDL_Surface * NewSurface  = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h,32, bmask, gmask, rmask, amask);


Change the masks to fit you color and alpha needs
Black CloakEpee Engine.

This topic is closed to new replies.

Advertisement