Sign in to follow this  
ChrisRX

Defining a surface in sdl

Recommended Posts

Following the lazyfoo tutorials, I define a new surface as null and then when loading an image the pointer to the surface is assigned. The problem I am having is that I want to define a new surface with a width and height etc. so that I can blit other surfaces to it. How do I get a pointer to a new surface of predetermined size?

Share this post


Link to post
Share on other sites
This would probably have been better int he alternate game librarys forum, if im reading your question corretly there is a function SDL_CreateRGBSurface() or something along those lines, that will create a surface for you.

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