# SDL hardware surface

## Recommended Posts

mylifemysoul    100
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]

##### Share on other sites
Kylotan    9866
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.

##### Share on other sites
mylifemysoul    100
Quote:
 Original post by KylotanI 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?

##### Share on other sites
Kylotan    9866
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.

##### Share on other sites
Simian Man    1022
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.