SDL whacked?
Well, I am trying to pick up SDL in my spare time and am going through a book and found this snippit of code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "SDL.h"
const SDL_VideoInfo* g_pVideoInfo = NULL;
int main(int argc, char *argv[])
{
SDL_Init(SDL_INIT_VIDEO);
atexit(SDL_Quit);
g_pVideoInfo = SDL_GetVideoInfo();
fprintf(stdout, "\nVideo Information
n");
fprintf(stdout, "hw_available? %d\n", g_pVideoInfo->hw_available);
fprintf(stdout, "wm_available? %d\n", g_pVideoInfo->wm_available);
fprintf(stdout, "blit_hw? %d\n", g_pVideoInfo->blit_hw);
fprintf(stdout, "blit_hw_CC? %d\n", g_pVideoInfo->blit_hw_CC);
fprintf(stdout, "blit_sw? %d\n", g_pVideoInfo->blit_sw);
fprintf(stdout, "blit_hw_CC? %d\n", g_pVideoInfo->blit_hw_CC);
fprintf(stdout, "blit_sw_A? %d\n", g_pVideoInfo->blit_sw_A);
fprintf(stdout, "blit_fill? %d\n", g_pVideoInfo->blit_fill);
fprintf(stdout, "video memory(in K)? %d\n", g_pVideoInfo->video_mem);
fprintf(stdout, "bits per pixel %d\n", g_pVideoInfo->vfmt->BitsPerPixel);
return (0);
}
in which my installation reports:
Video Information:
hw_available? 0
wm_available? 0
blit_hw? 0
blit_hw_CC? 0
blit_sw? 0
blit_hw_CC? 0
blit_sw_A? 0
blit_fill? 0
video memory(in K)? 0
bits per pixel 32
which cannot possible be correct for a Radeon 9000 Pro. What's the deal?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "SDL.h"
const SDL_VideoInfo* g_pVideoInfo = NULL;
int main(int argc, char *argv[])
{
SDL_Init(SDL_INIT_VIDEO);
atexit(SDL_Quit);
g_pVideoInfo = SDL_GetVideoInfo();
fprintf(stdout, "\nVideo Information
n");fprintf(stdout, "hw_available? %d\n", g_pVideoInfo->hw_available);
fprintf(stdout, "wm_available? %d\n", g_pVideoInfo->wm_available);
fprintf(stdout, "blit_hw? %d\n", g_pVideoInfo->blit_hw);
fprintf(stdout, "blit_hw_CC? %d\n", g_pVideoInfo->blit_hw_CC);
fprintf(stdout, "blit_sw? %d\n", g_pVideoInfo->blit_sw);
fprintf(stdout, "blit_hw_CC? %d\n", g_pVideoInfo->blit_hw_CC);
fprintf(stdout, "blit_sw_A? %d\n", g_pVideoInfo->blit_sw_A);
fprintf(stdout, "blit_fill? %d\n", g_pVideoInfo->blit_fill);
fprintf(stdout, "video memory(in K)? %d\n", g_pVideoInfo->video_mem);
fprintf(stdout, "bits per pixel %d\n", g_pVideoInfo->vfmt->BitsPerPixel);
return (0);
}
in which my installation reports:
Video Information:
hw_available? 0
wm_available? 0
blit_hw? 0
blit_hw_CC? 0
blit_sw? 0
blit_hw_CC? 0
blit_sw_A? 0
blit_fill? 0
video memory(in K)? 0
bits per pixel 32
which cannot possible be correct for a Radeon 9000 Pro. What's the deal?
I don't know what all those flags mean, but only "wm_available 0" seems odd...
I don't understand your question? If you're asking why your HW blit or SW blit is not supported? In SDL you need to send the flags on what options you want turned on for rendering. e.g. openGL, SW mode, DOUBLE BUFFERING, ect... In the code example nothing has been setup except go into videmode.

