(SDL) SDL_GetVideoInfo

Started by
3 comments, last by rip-off 17 years, 4 months ago
If you have read the book Focus on SDL, there is a code example pretty early in there that uses SDL_GetVideoInfo to retrieve information about graphics capabilities. Compiling and running that program on my Linux machine reveals i get a 0 in all fields except for the wm_available field, i.e. there is no hardware capabilities at all. This sounds rather peculiar to me since my GFX card is a NVIDIA 6600GT and surely it has hardware support for blitting etc (I was expecting ones in all fields of the SDL_VideoInfo structure) Is this likely to be a driver issue on my linux system, or is this something else ? (i do not have the possibility to test on an Windows machine) Another intruiging bit of information is that on my laptop, with intel graphics the result is absolutely the same. Though both systems run Ubuntu 6.10 if that is vital. Best Regards
Advertisement
As far as I know, SDL 1.2 doesn't support hardware acceleration. However SDL 1.3 will.

Learn to make games with my SDL 2 Tutorials

The best read on SDL and hardware acceleration I have come across. ( the other 2 articles are good too )

In it it details that you must change the video driver you use in order to get hardware acceleration.

[Edited by - rip-off on December 12, 2006 6:56:15 PM]
Thanks for the information.

Though I fail to make it work with dga, I understand that it is buggy anyway, hopefully in the future we see better hardware support (not only in SDL)on linux and unix platforms.

If using SDL as a "helper" to set things up and load images etc though rendering the actual graphics using OpenGL, then I do get all the hardware benefits of the GPU ?

Best Regards
Quote:Original post by IanPallton
Thanks for the information.

Though I fail to make it work with dga, I understand that it is buggy anyway, hopefully in the future we see better hardware support (not only in SDL)on linux and unix platforms.

If using SDL as a "helper" to set things up and load images etc though rendering the actual graphics using OpenGL, then I do get all the hardware benefits of the GPU ?

Best Regards


Of course. Opengl through SDL is the same as through native window manager code.

It must be noted that SDL software mode can perform more than adequetly depending on what you are doing. I've never found it to be too slow for me.

This topic is closed to new replies.

Advertisement