Sign in to follow this  

[SDL_GFX] Removing SDL_GFX primitives

This topic is 2051 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 everyone [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Had a small question about the removal of primitives drawn using the SDL_GFX library. I know how to draw the primitive ( circleColor (destination, x, y, radian, color); for example ). However, I haven't really figured out a way to access the primitive after its creation been made. At the moment, the destination of the primitive is the screen. I've tried adding it to different surfaces, however..that didn't really seem to work out ( the program exploded ). Does anyone have any suggestions?

Share this post


Link to post
Share on other sites
Hi Applegenie,

I've tried to use SDL_GFX in the past, and, I can get it to work. But, the main issue I had with SDL_GFX is it does everything in software, which turned out to be incredibly slow, especially for things like rotation and scaling.

So, I moved to SFML, which provided all the GFX primitives, as well as GFX tranforms (scaling and rotating) done in HW, but all with the same SFML API-set. I would suggest checking out SFML (get version 2.0) before getting too deep with SDL:
[url="http://sfml-dev.org"]http://sfml-dev.org[/url]

Share this post


Link to post
Share on other sites
The "primitives" are drawn onto the surface. If you want to remove them from the surface you have to draw something else on top of it.

Share this post


Link to post
Share on other sites

This topic is 2051 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.

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