Why not just use your own image and blit it to the screen?
One reason that I would like to be able use native colour mouse cursors
is if they are in the native OS’s format, it is one less thing to blit
within the game loop, that I could be using for something else.
Yep, if the cursor hardware supports color cursors then doing it through
the windowing system will save a tiny bit of time. Generally it is not
enough that you need to worry about it though. OTOH, the windowing
system may draw the cursor the same way you do, by blitting it to the
screen, in which case you don’t save any thing at all.
I think
this may be why Age of Empires and I think Age of Mythology tended to
use native cursors, rather than bitmaps.
This is based on the assumption that the OS takes care of drawing the
native mouse cursors.
I know this is a touch picky, but you are asking about X11. X11 is not
part of the OS. It is a process that runs like any other process on your
computer. This is a huge difference between UNIX/Linux and Windows. On
Windows, the desktop graphic system is part of the OS.
Anyway, X11 may support rgba cursors. Take a look at
http://www.die.net/doc/linux/man/man3/xcursor.3.html or google for “man
page xcursor” for more info. As far as I can tell SDL does not support
color cursors. There is no guarantee that a given platform supports
color cursors, in fact there is no guarantee that a given platform will
support cursors at all (and many do not). So, SDL supports 2 plane
cursors, nice middle ground.
It looks like color cursor support was removed from SDL in version
0.9.14, a very long time ago. I’m sure there were good reasons for
removing it. I wonder if those reasons are still valid. I wasn’t around
this list back then so I don’t know the reasons.
Bob PendletonOn Tue, 2005-05-03 at 22:13 +0100, Dominique Louis wrote:
Dominique Louis.
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
–
±-------------------------------------+