I'm just starting with SDL, and I appear to have hit a little snag already. The information returned by SDL_GetVideoInfo would have me believe my video card has no capabilities, but I'm fairly sure that is not the case (it's a GeForce Ti4400). I'm running Gentoo Linux, if that helps. Here's the entirety of the test program I'm using, and the output it generates:
#include <iostream>
#include <stdlib.h>
#include "SDL.h"
using namespace std;
int main(int argc, char *argv[])
{
if(SDL_Init(SDL_INIT_VIDEO)< 0) {
cout <<"Could not initialize SDL:" << SDL_GetError() << endl;
SDL_Quit();
return 0;
}
const SDL_VideoInfo *vidinfo = SDL_GetVideoInfo();
char drivername[255];
SDL_VideoDriverName(drivername,255);
cout << "Video Driver Name: " << drivername << endl;
cout << "Hardware Surfaces: " << vidinfo->hw_available << endl;
cout << "WM Available: " << vidinfo->wm_available << endl;
cout << "HW Blits: " << vidinfo->blit_hw << endl;
cout << "HW Colorkey Blits: " << vidinfo->blit_hw_CC << endl;
cout << "HW Alpha Blits: " << vidinfo->blit_hw_A << endl;
cout << "SW to HW Blits: " << vidinfo->blit_sw << endl;
cout << "SW to HW Colorkey Blits: " << vidinfo->blit_sw_CC << endl;
cout << "SW to HW Alpha Blits: " << vidinfo->blit_sw_A << endl;
cout << "Color Fills: " << vidinfo->blit_fill << endl;
cout << "Video Mem: " << vidinfo->video_mem << " kb" << endl;
SDL_Quit();
return 0;
}
syph3r@tux src $ ./sdltest
Video Driver Name: x11
Hardware Surfaces: 0
WM Available: 1
HW Blits: 0
HW Colorkey Blits: 0
HW Alpha Blits: 0
SW to HW Blits: 0
SW to HW Colorkey Blits: 0
SW to HW Alpha Blits: 0
Color Fills: 0
Video Mem: 0 kb