• Advertisement
Sign in to follow this  

SDL_Surface in a class

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