Sign in to follow this  
Costinel Constinel

SDL_Surface in a class

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

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