Return Value

Code Examples

/* Create a 32-bit surface with the bytes of each pixel in R,G,B,A order, as expected by OpenGL for textures */SDL_Surface*surf;surf=SDL_CreateRGBSurfaceWithFormat(0,width,height,32,SDL_PIXELFORMAT_RGBA32);if(surf==NULL){SDL_Log("SDL_CreateRGBSurfaceWithFormat() failed: %s",SDL_GetError());exit(1);}