Re: Faster rendering to screen



Does SDL not go via X?

Yes, or framebuffer, or Windows API, just like GTK, so they can work together.

The mplayer people use a hardware overlay,
Which is what precisely?

A hardware overlay is a bitmap that isn't drawn to the screen in the usual sense but instead you specify where on the screen to put it and the hardware combines it with the traditionally drawn stuff at the last stage before the image is sent to the physical display device.

This special bitmap lives in the graphics card so it's very fast, and because there is no blitting and is controlled by the hardware it updates without any flicker.

SDL has functions to create an overlay and then copy bitmaps to it. You simply copy a new bitmap to it 30 times a second.

It's fast enough for mplayer.

The only catch is that an overlay is very close to the hardware and you have to play by its rules, including using whatever funny pixel format that it wants.

Chris Seaton



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]