Why hwsurface not created and how to Create?? |
Jonny D
|
Maybe you want to check pSurface->flags instead of pSurface (the pointer)?
Jonny D On Sun, Sep 9, 2012 at 8:02 PM, axt32 wrote:
|
|||||||||||||
|
Why hwsurface not created and how to Create?? |
axt32
|
<SORRY FOR re-post the same article. please delete http://forums.libsdl.org/viewtopic.php?t=8443>
Well, i found the cause of Choppy frame animation is that hwsurface creation fails. My Development Environment is MS Visual Studio 2010, Windows 7. My Graphic card is ATI Radeon HD 5800. though i added 'flags', the problem not solved. hwsurface and double buffering are not activated. ------------------------------------------------------------------------------------------ if (bFullScreen == true) { pSurface = SDL_SetVideoMode(640, 480, 32, SDL_ANYFORMAT | SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN); } else { pSurface = SDL_SetVideoMode(640, 480, 32, SDL_ANYFORMAT | SDL_HWSURFACE | SDL_DOUBLEBUF); } if ( !(pSurface->flags & SDL_HWSURFACE)) { printf ("HWSURFACE failed.\n); } if ( !(pSurface->flags & SDL_DOUBLEBUF)) { printf ("DOUBLEBUF failed.\n); } Both of Error Message appears in my computer. why hwsurface creation fails and how to solve this?? [img]http://mail.naver.com/readReceipt/notify/?img=RPKsKoFdDzJoax%2BCKxUYK6traAk4po2ZKx0oF6F0poISp4u%2FKrEZFdId%2BrkSKx25W4d5W4C5bX0q%2BzkR74FTWx%2Fsbr3ntzwGbX3q74wGMNFvWVlTb4b%3D.gif[/img] |
|||||||||||
|
Why hwsurface not created and how to Create?? |
Torsten Giebl
|
Hello !
I guess you are using SDL 1.2 and that uses GDI as the primary driver for GFX output, so no doublebuffering or hardware surfaces support there. If your SDL.dll was compiled with DirectX support, there is an old driver in SDL for DirectX 5, which you can try, but there is no guarranty that it works okay today. To activate it put this : SDL_putenv("SDL_VIDEODRIVER=directx"); before using SDL_Init (SDL_INIT_VIDEO); The recommendation would be to use SDL 2.0, that gives you full HW Acceleration/VSync with DirectX and OpenGL. CU _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Why hwsurface not created and how to Create?? |