SDL hardware surface

Started by
3 comments, last by Simian Man 14 years ago
I am using two functions to test if my programs using the hardware surfaces. However, the results are different. 1> result is videoInfo->hw_available is 0

videoInfo = SDL_GetVideoInfo();
if(!videoInfo->hw_available)       //here videoInfo->hw_available is 0
   out << "not hardware surface!"; 
2> result is (screen->flags & SDL_HWSURFACE) is 1

screen = SDL_SetVideoMode( screenWidth, screenHeight, screenBpp, videoFlags );

if(screen->flags & SDL_HWSURFACE == 0) //here (screen->flags & SDL_HWSURFACE) is 1
   out << "not hardware surface!"; 
So, the 1st one means my video hardware is not available for my SDL program, while the 2nd one means I am actually using a hardware video surface... I am confused. [Edited by - mylifemysoul on March 31, 2010 9:30:31 PM]
Advertisement
I don't think it really matters to be honest. Most people just use software surfaces these days as hardware surfaces are usually slower once you start needing to do any blending.
Quote:Original post by Kylotan
I don't think it really matters to be honest. Most people just use software surfaces these days as hardware surfaces are usually slower once you start needing to do any blending.


What you mentioned is true, but I am just very curious about my two different results. They are supposed to be the same, aren't they?
Probably. The SDL mailing list could probably give you a better answer. There are certainly plenty of posts on there with some variation of this question so I expect it's a known issue.
I've run into quite a few bugs when trying to use hardware surfaces in general. I'm really not surprised that this happens. Kylotan is right that most people have given up on the hardware acceleration as a bad job.

This topic is closed to new replies.

Advertisement