Unable to get a hardware surface in SDL in Win32[Solved]

Started by
0 comments, last by BlueShizz 17 years, 9 months ago
I have a AMD Sempron System/Nvidia GeForce3 32mb video ram ,main memory 256 mb/winxp sp2 using VC++6.0 using SDL 1.2.10, latest nvidia drivers 81.25. I have verified that directx 9.0c is installed using dxdiag command & all directx games like age of empires run. I am unable to get a hardware surface When i run SDL with the following code //The attributes of the window const int SCREEN_WIDTH = 800; const int SCREEN_HEIGHT = 600; const int SCREEN_BPP = 32; //The surfaces that will be used SDL_Surface *screen = NULL; //Initialize SDL bool init() { //Initialize all SDL sub systems if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 ) { return false; } //Set up the screen screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_HWSURFACE ); /* Information about the current video settings. */ const SDL_VideoInfo* info = NULL; info = SDL_GetVideoInfo( ); printf("\nhw avail:%d",info->hw_available); //If there was in error in setting up the screen if( screen == NULL ) { return false; } //Set the window caption SDL_WM_SetCaption( "Test!", NULL ); //If everything initialized fine return true; } The driver reported is windib i am informed that a window manager is available but neither hardware surfaces nor h/w blitting(& all other associated stuff) is available. If directx is installed & SDL tests for directx 1st before windib then why cant it use directx. i have tried putenv("SDL_VIDEODRIVER=directx")....no effect i am getting sluggish performance ...do i have to rebuild SDL src with directx support ? --------------------------- problem solved people use putenv("SDL_VideoDriver=directx"); before SDL_init() default driver in windowed or fullscreen mode is windib-s/w driver [Edited by - spriteguru on July 22, 2006 2:21:04 PM]
Advertisement
I think it may have something to do with the Visual Studio version. It is a bit hard trying to get VS 6.0 to work with DirectX 9.0.

This topic is closed to new replies.

Advertisement