ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I am trying to use the DGA video driver with a SDL program I am writing. I'm trying to use DGA in order to speed things up. I've had very little success with this however.
First of all, on a computer running Mandrake 10, I simply get a "No available video device" error when attempting to set the video mode inside the program. However, the dga test program (/usr/X11R6/bin/dga) runs without complaining.
On a second computer running Slackware it gives me the same error unless I load the ATI 3d driver module, at which point it runs but there is a very strange flickering on any portion of the screen that I do not draw to before updating the screen.
Does anyone know how to get this DGA driver working correctly? Or does anyone know a forum that I may find more advice on? Thanks!
Thanks for the reply. The above video mode compiles and loads just fine, but whenever I try to draw to the screen at in the way I was I get a segmentation fault (whenever I attempt to fill in the in the surface with a pixel or perform a flip.) How am I supposed to draw to the screen w/ the above video mode?
Thanks for your posts, but if you don't mind, I still have more questions. When I take out the SDL_OPENGL flag I can draw pixels again, but there is no speedup at all. Actually, when I check the flag with:
Code:
if(!(screen->flags & SDL_HWACCEL))
fprintf(stderr, "No hardware acceleration\n");
the check always fails, which leads me to believe that I'm still not getting a hardware surface or any kind of acceleration (checking for SDL_HWSURFACE fails also.) So what else must I do to obtain a hardware surface? I'm sorry if answering these questions is a big drag. If there are any good sources of information (books, faqs, whatever) other than the stuff at the SDL website (which I've already thoroughly combed through) that might help, please give me the heads up. Thank you again!
To use DGA as SDL Video driver, you have to set the environement variable SDL_VIDEODRIVER=dga. It works only in fullscreen, and if dga is properly configured. Some other video drivers are also available.
Originally posted by HAL 0006 To use DGA as SDL Video driver, you have to set the environement variable SDL_VIDEODRIVER=dga. It works only in fullscreen, and if dga is properly configured. Some other video drivers are also available.
Check the SDL FAQ for more information.
I get
Call to SDL_SetVideoMode() failed! - SDL_Error: OpenGL not available
if I set SDL_VIDEODRIVER=dga
Does this mean that dga is not properly configured? Or should I blame ATI (I use a radeon 9800 with fglrx 8.10.19)?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.