Jump to content
  • Advertisement
Sign in to follow this  
Costinel Constinel

SDL_Surface in a class

This topic is 2102 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

Hello. I'm in the process of creating a class which represents and deals with a SDL_Surface. 

The class will have many procedures involving drawing stuff on it's surface, such as circles, squares, polygons, filled circles, image sprites, etc...


The problem is, how do I actually create a surface to be drawn onto?

All the methods I know by now is to either call SDL_SetVideoMode or SDL_LoadBMP and thats how I get a fully functional surface. 


But if I'll have many objects, I can't call SetVideoMode in each of them, and to use the latter method, I would need a BMP file in the application's folder, but I don't want my class to be dependent on external files...



Any suggestions blink.png ?

Edited by Beggining_not_really

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!