SDL and DGA video driver
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! |
Hmmm, does anyone at least have any hints about enabling hardware acceleration in SDL?
|
SDL_SetVideoMode( width, height, bps, SDL_FULLSCREEN | SDL_OPENGL | SDL_HWPALETTE |SDL_HWACCEL);
|
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 again! |
If you want to draw on the surface with a pixel remove the SDL_OPENGL flag from
the above function call. |
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:
|
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. |
Quote:
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)? |
All times are GMT -5. The time now is 02:18 AM. |