Gidday.
I’m running a simple sdl test on the following machine:
Athlon 2000+XP
RedHat Linux 9
GeForce4Ti4200 w/ 64MB ram.
SDL 1.2.5
After running the attached code (compiled with gcc sdlmode.c sdl-config --cflags --libs
), I get the following output:
Hardware surface is not supported.
Double buffer mode is not supported.
I have tried this with both the official ‘nvidia’ 4496 and the Open
Source ‘nv’ driver with the same result.
Any thoughts on why SDL can’t create a hardware surface on my video card?
tia,
Greg
— sdlmode.c code begins ----
#include “SDL.h”
#include <stdio.h>
#include <stdlib.h>
#define SCREEN_X 1024
#define SCREEN_Y 768
#define SCREEN_BPP 32
#define FULLSCREEN_SELECTED 1
SDL_Surface *screen;
int main(int argc, char *argv[]) {
if (SDL_Init(SDL_INIT_VIDEO) != 0) // Initialise SDL
{ printf(“Unable to initialise SDL: %s\n”,SDL_GetError());
return 1;
};
atexit(SDL_Quit);
screen = SDL_SetVideoMode(SCREEN_X, SCREEN_Y, SCREEN_BPP,
(SDL_FULLSCREEN * FULLSCREEN_SELECTED) | SDL_HWSURFACE | SDL_HWACCEL |
SDL_DOUBLEBUF);
if(!(screen->flags & SDL_HWSURFACE)) {
fprintf(stderr, “Hardware surface is not
supported.\n”);
}
if(!(screen->flags & SDL_FULLSCREEN)) {
fprintf(stderr, “Fullscreen mode is not
supported.\n”);
}
if(!(screen->flags & SDL_DOUBLEBUF)) {
fprintf(stderr, “Double buffer mode is not
supported.\n”);
}
return 0;
}