How to create a 16bit surface using SDL_CreateRGBSurface?

I am implementing a programming that displays video stream.

I want to have two surfaces in 16bits so that I can use flip_surface to
accelerate it.

I checked the API of SDL_CreateRGBSurface, but still don’t know how to create a
16 bits surface. Can anybody help me?

Thanks!

I am implementing a programming that displays video stream.

I want to have two surfaces in 16bits so that I can use flip_surface to
accelerate it.

I checked the API of SDL_CreateRGBSurface, but still don’t know how to
create a
16 bits surface. Can anybody help me?

  SDL_Surface  *SDL_CreateRGBSurface(
       Uint32 flags,
       int width,
       int height,
       int depth,                <--- set to 16
       Uint32 Rmask,
       Uint32 Gmask,
       Uint32 Bmask,
       Uint32 Amask);On Jul 18, 2004, at 8:44 PM, wangxiaohu wrote:

Thanks!


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl