X cursor, was Re: [SDL] Re: Doublebuffering access to front and backbuffer?

Bob Pendleton bob at pendleton.com
Sat Jan 4 17:32:01 PST 2003

On Fri, 2003-01-03 at 09:30, Daniel Phillips wrote:

> Combining drawing a sprite, say, into the buffer and drawing the same sprite 
> directly to the screen at a higher framerate (don't forget to draw it into 
> the back buffer first, or it will rip) is a technique I've used with success, 
> and which I consider essential for achieving that smooth, professional feel 
> for a 3D app, especially an editor.
> Run a slow animation, and you will notice that the X cursor already works 
> this way, though I doubt that's explicitly part of SDL.

There are at least three different ways that the X cursor is drawn. Most
of the time (these days) there is hardware cursor support that inserts
the curors pixels into the video output in the video hardware. Sometimes
it is drawn using a real overlay plane. And, a lot of the time it is
drawn using "save unders". Which means that the pixels under the cursor
are saved and the cursor is drawn directly into the frame buffer. Before
any drawing is done the server puts the pixels back does the drawing,
and then redraws the cursor. It gets more complicated in mulitibuffered
X servers, but I haven't seen one of those for a long time.

I spent 5 years of my life porting X servers to high performance 3D
workstations. I'd almost give up a body part to find a job like that

		Bob Pendleton

+ Bob Pendleton, consultant for hire +
+ Resume: http://www.jump.net/~bobp  +
+ Email:  bob at pendleton.com          +

More information about the SDL mailing list