Sign in to follow this  

Does SDL have any method to open a website?

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

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

This topic is 3113 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this