Can't create HWSURFACE and DOUBLEBUF

i have two problems :((
i have : CeleronII 566, 256Mo ram, voodoo5, redhat7, kernel2.4pre8 and
SDL1.1.6

when i call GetVideoInfo, i get values like : 0Mo ram for my video card

when i call SetVideoMode, the surface created is not in video memory or
with double buffer…
where am i wrong ?

********** my code

int main() {

SDL_Surface *s;
const SDL_VideoInfo *vi;

SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_EVENTTHREAD);

vi = SDL_GetVideoInfo();

printf(“hw available : %d\nblit hw-hw : %d\nblit sw-hw : %d\nvidmem :
%d\nbpp : %d \n”,
vi->hw_available,
vi->blit_hw,
vi->blit_sw,
vi->video_mem,
vi->vfmt->BitsPerPixel);

s = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE | SDL_DOUBLEBUF);

printf(“hwsurface : %d\ndoublebuf : %d\n”,
(s->flags & SDL_HWSURFACE) == SDL_HWSURFACE,
(s->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF);

return 0;
}

*********** the output
hw available : 0
blit hw-hw : 0
blit sw-hw : 0
vidmem : 0
bpp : 32
hwsurface : 0
doublebuf : 0

i have two problems :((
i have : CeleronII 566, 256Mo ram, voodoo5, redhat7, kernel2.4pre8 and
SDL1.1.6

when i call GetVideoInfo, i get values like : 0Mo ram for my video card

when i call SetVideoMode, the surface created is not in video memory or
with double buffer…
where am i wrong ?

You’re not doing anything wrong. The X11 core protocol isn’t designed
with that kind of hardware access in mind. What you want is to use the
DGA 2.0 video driver, which you can do by setting an environment variable.

See the FAQ:
Hum, it’s not in the FAQ (note to self, add this to the faq)

export SDL_VIDEODRIVER=dga

Then run your SDL program as root in that terminal window.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

That’s the same problem I have with a MilleniumG400. But under Windows it
works, while under Linux it doesn’t…

Marco Iannaccone @Marco_Iannaccone
ICQ: 18748121 Tolkien

“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 Tanhauser Gate. All
those… moments will be lost… in time…, like… tears… in… rain.”

Marco Iannaccone wrote:

That’s the same problem I have with a MilleniumG400. But under Windows it
works, while under Linux it doesn’t…

Marco Iannaccone marciann at tin.it
ICQ: 18748121 Tolkien

“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 Tanhauser Gate. All
those… moments will be lost… in time…, like… tears… in… rain.”

Hi,

I think it depends first on your Linux system. I mean to use Hardware
blitting and transferring acceleration you have to run a good XFree version.
By “good” I mean that you have to install Matrox driver to perform in such a
way. Thus, I’m using a Mandrake 7.x with Xfree 4.0.1 and Nvidia drivers for
my TNT2 and it works fine (hum at least I can use hardware acceleration, but
to be frank it crashes every time i try to play a game by loki, nvidia
drivers are not really stable !!!)

Anyway you should upgrade your system !

Bye
Lawouach

French do love SDL…