Jump to content
  • Advertisement
Sign in to follow this  
Applegenie

[SDL_GFX] Removing SDL_GFX primitives

This topic is 2382 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 smile.png

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
Advertisement
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:
http://sfml-dev.org

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
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!