Does SDL have any method to open a website?

Started by
5 comments, last by aaron_ds 14 years, 10 months ago
Hi dudes! I wonder if SDL have some method (platform independent) to open a website or link. Thanks in advance.
I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time, like tears in rain. Time to die.
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.
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 )
OK. Understood ;)

Thanks!
I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time, like tears in rain. Time to die.
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)
Thanks! It is useful.
I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time, like tears in rain. Time to die.
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.

This topic is closed to new replies.

Advertisement