OpenGL/SDL/Windows ATI problem :(
Hi guys..
I have a big problem.
A lot of users in my game complain about the fact that they get 0-2 FPS, even tho they have nice video baords (all of them with this problem has some sort of ATI card...)
And, sure enough, the game falls back to software acceleration.
Now, I was wondering, do you know WHY this happen? BTW, in Linux, no one with an ATI card complained, so I guess this is some sort of M$is thing?
Height Map Editor | Eternal Lands | Fast User Directory
In straight Win32, you only get the software renderer if you set a pixel format that''s not supported - and even that''s hard to do since under most circumstances the driver will try to pick the closest hardware accelerated format available. I haven''t worked that much with SDL so I don''t know how much control over this process it abstracts away. It could very well be that there''s a problem within the SDL code.
This is strange, ebcause one of my users who had that problem downgraded his driver, and it worked just fine (only WinXP complains about soem drivers not beign updated).
Anyway, here is my OpenGL init code: (it is SDL specific, but it is obvious even if you know little about SDL)
Oh, and the worst thing is that I don''t have ani ATI card, so I can''t expermiment with different settings
Height Map Editor | Eternal Lands | Fast User Directory
Anyway, here is my OpenGL init code: (it is SDL specific, but it is obvious even if you know little about SDL)
Oh, and the worst thing is that I don''t have ani ATI card, so I can''t expermiment with different settings
/* Detect the display depth */ if(!bpp) { if ( SDL_GetVideoInfo()->vfmt->BitsPerPixel <= 8 ) { bpp = 8; } else { bpp = 16; /* More doesn''t seem to work */ } } /* Initialize the display */ switch (bpp) { case 8: rgb_size[0] = 2; rgb_size[1] = 3; rgb_size[2] = 3; break; case 15: case 16: rgb_size[0] = 5; rgb_size[1] = 5; rgb_size[2] = 5; break; default: rgb_size[0] = 8; rgb_size[1] = 8; rgb_size[2] = 8; break; } SDL_GL_SetAttribute( SDL_GL_RED_SIZE, rgb_size[0] ); SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, rgb_size[1] ); SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, rgb_size[2] ); SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 ); SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 8 ); SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); //if(full_screen)flags=SDL_OPENGL|SDL_RESIZABLE|SDL_FULLSCREEN; if(full_screen)flags=SDL_OPENGL|SDL_FULLSCREEN; //else flags=SDL_OPENGL|SDL_RESIZABLE; else flags=SDL_OPENGL; //try to find a stencil buffer (it doesn''t always work on Linux) if(!SDL_SetVideoMode(window_width, window_height, bpp, flags)) { SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE,16); SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE,0); if(!SDL_SetVideoMode( window_width, window_height, bpp, flags)) { char str[120]; sprintf(str, "Couldn''t set GL mode: %s\n", SDL_GetError()); log_error(str); SDL_Quit(); exit(1); } have_stencil=0; }
Height Map Editor | Eternal Lands | Fast User Directory
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement