Jump to content
  • Advertisement
Sign in to follow this  
riruilo

Does SDL have any method to open a website?

This topic is 3329 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

Hi dudes! I wonder if SDL have some method (platform independent) to open a website or link. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
I think that discipline could be considered a killer argument for Qt, which has full Webkit integration. Dunno about SDL, but afaik it hasn't.

Share this post


Link to post
Share on other sites
The answer is no, SDL is only a graphics rendering and sounds layer.
www.libsdl.org
You have to develop everything by yourself.
You can call third parties i.e. C#/.NET webservices.
You can also use frameworks like Qt as mentioned before

( La repuesta es no ; SDL solo sirve para graphicos )

Share this post


Link to post
Share on other sites
If you are only looking to download information from a website (ie getting the high scores via a PHP script or something) you might want to check out libcurl. It's very nice.

http://curl.haxx.se/

If you really want to display text from the web, you could also maybe just use curl to download the text and then render it yourself in game.

I'd keep it simple though cause if you allow html tags, parsing that and rendering it correctly is going to be very painful (many major browsers are still fighting with that even including IE hehe)

Share this post


Link to post
Share on other sites
Quote:
Original post by HolyGrail
The answer is no, SDL is only a graphics rendering and sounds layer.
www.libsdl.org
You have to develop everything by yourself.


It depends on if you consider SDL_net to be a component of SDL.

You would have to use SDLNet_ResolveHost to lookup the destination IP address given the hostname. Then open a TCP socket on port 80, construct an HTTP GET request and read off the response.

All of this is do-able using SDL_net. CURL would do all of this automatically and more easily than using SDL_net.

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!