[SDL] Custom mouse cursor size
benang at cs.its.ac.id
benang at cs.its.ac.id
Tue Dec 5 19:02:14 PST 2006
Thanks. So, I must use my own mouse cursor surface and keep track of the
mouse movement than using the SDL's own cursor?
David Olofson said:
> On Tuesday 05 December 2006 10:47, benang at cs.its.ac.id wrote:
>> Hi, I needed to make a large customized mouse cursor. What is the
>> maximum dimension of a mouse cursor? I know that the width and
>> height have to be a multiple of 8, so can I make, for example, 160 x
>> 160 pixel cursor? Thanks in advance.
>
> I don't think there is any reliable and portable way of doing that,
> using the "real" mouse cursor features. The mouse cursor is often an
> actual hardware sprite, which means size, depth, blending features
> etc are totally hardware dependent. Even when it's not a hardware
> sprite, you may run into platform API and/or driver limitations.
>
> The "standard" solution is to disable the normal mouse cursor, and
> implement your own cursor rendering. That is, make it
> another "sprite", implemented using SDL_BlitSurface(), an OpenGL
> quad, a 3D model, or whatever fits your application.
>
> Downsides of this approach:
>
> * Cursor motion smoothness is limited by your
> application's rendering frame rate. (Not a
> problem if you can do partial smart updates,
> but that's not always an option.)
>
> * Your custom mouse cursor is clipped within
> your application window in windowed mode.
>
>
Fare thee well,
Bawenang R. P. P.
----------------
"I live for my dream. And my dream is to live my life to the fullest."
More information about the SDL
mailing list