Sign in to follow this  
Think128

SDL_Surface Size Limit

Recommended Posts

Think128    124
I read somewhere (I thought it was in the actual SDL docs but apparently I was mistaken) that SDL_Surfaces have size limits. If you assign too much data to them (i.e. load too big of an image) then they sieze up and cause bunches of errors. Is this true? If so what is the limit?

Share this post


Link to post
Share on other sites
Stompy9999    792
I asked a similar question concerning allegro BITMAPs awhile ago. The basic answer I recieved was that if you're going over the size limit, you're probably doing something wrong.

Share this post


Link to post
Share on other sites
Will F    1069
This was brought up on the SDL mailing list somewhat recently in a thread called [SDL] pre-load frames in memory:

Quote:
Btw, note that because SDL 1.x uses 16-bit words for surface width and height, you can't have a surface wider than 16383 pixels, or higher than 65535 pixels. (There's a bug in 1.2.8 that makes the height limit 16383 as well, but Sam's fixed that in CVS).


Those are pretty big numbers - off the top of my head I can't think of any reason you'd need (or want) surfaces that are larger than 16,000 pixels wide or high

Share this post


Link to post
Share on other sites
Think128    124
Very true and thanks for explaining.

I'm trying to make a 2d side-scroller and instead of tiling I was going to use drawn levels. I wanted to know what kind of limitations I might have to work around.

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