Jump to content
  • Advertisement
Sign in to follow this  
ChrisRX

Defining a surface in sdl

This topic is 3660 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!