Jump to content
  • Advertisement
Sign in to follow this  
fmwyso

OpenGL Loading .Cur to surface

This topic is 3497 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!