Loading .Cur to surface

Started by
1 comment, last by fmwyso 15 years, 3 months ago
Hey, someone stated (in a thread on this site) that I should just override the default cursor and write my own function for loading the cursor... This definitely seems like a better output, but the problem is that I have no idea how to load a .cur file into a SDL_Surface (Which I'm assuming is the only way I can output it onto my screen?). Anyway, my question is how to load a .cur extension file into a surface or texture and then display it on the screen... It should be known that I'd rather .cur considering there are a bunch of sexy cursor packs and most are written in .cur format :P. Also, if possible I would also like to have this "function" be able to display the texture / cursor in different alpha blends for transparency. Thanks, fmwyso P.S. I am using SDL + OpenGL, the template from the NeHe's new lesson tutorial. I am compiling in C++ for Windows and my compiler is CodeBlocks.
Advertisement
You probably have to write an loader yourself
heres some info http://www.daubnet.com/en/file-format-cur

The easiest way would probably be to convert it to BMP or TGA, i know that at least Paint shop pro can load them, but most other image processing programs should be able to load them.
http://www.freedownloadscenter.com/Best/free-bmp-to-cur.html if you don't have one that works.
Dang, that is a pain :P... kk, I'll just convert them to bmp (not too big of a deal) and look up how to load bmp's... Shouldn't be too difficult (I assume).

-- Edit --

So I assumed wrong and the BMP loading thing is totally confusing me because of how SDL_Surface and OpenGL work w/ each other or something or another xD.

Could anyone give me a working, well explained example of how to get a bitmap to load onto the screen? Also... I would like it to auto-transparency any color that is pure white... That's usually what they do right?

[Edited by - fmwyso on January 16, 2009 4:36:49 PM]

This topic is closed to new replies.

Advertisement