Sign in to follow this  
mylifemysoul

SDL hardware surface

Recommended Posts

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 this post


Link to post
Share on other sites
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 this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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 this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this