Hi,
I’m writing a program that uses SDL 1.2.6 (precompiled DLL) + OpenGL
under Windows 98. On my previous S3 ProSavage 4, it worked fine, but
I’ve just installed a Radeon 9200 SE 128MB and now SDL_SetVideoMode()
crashes (parachute thingy).
Here’s the code I’m using:
SDL_Surface *screen = NULL;
const SDL_VideoInfo *info = NULL;
int bpp;
if( SDL_InitSubSystem( SDL_INIT_VIDEO ) < 0 ) {
printf( “Error initializing video: %s\n”, SDL_GetError() );
return FALSE;
}
info = SDL_GetVideoInfo();
if( !info ) {
printf( “Video query failed: %s\n”, SDL_GetError() );
Display_Exit();
return FALSE;
}
bpp = info->vfmt->BitsPerPixel;
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
SDL_Surface *surf = IMG_Load( “perle_1a.png” );
if( surf ) {
SDL_WM_SetIcon( surf, NULL );
SDL_FreeSurface( surf );
}
screen = SDL_SetVideoMode( g_Width, g_Height, bpp, SDL_OPENGL );
g_Width is 640 and g_Height is 480. The bpp returned by GetVideoInfo is
32, but I’ve tried 24 and 0 and it still crashes.
Am I doing anything wrong ? Any clue about what could be done to avoid
the crash ?–
Incoming HTML mails are automatically deleted.
“When a monster is shot, I want some blood particles to fly around. Does
anybody have an idea, how and in which direction the particles should
fly?”