Jump to content

  • Log In with Google      Sign In   
  • Create Account

[SDL_GFX] Removing SDL_GFX primitives


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Applegenie   Members   -  Reputation: 109

Like
0Likes
Like

Posted 04 June 2012 - 06:57 AM

Hello everyone Posted Image

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?

Sponsor:

#2 BeerNutts   Crossbones+   -  Reputation: 3007

Like
0Likes
Like

Posted 04 June 2012 - 08:52 AM

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
My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

#3 Wooh   Members   -  Reputation: 652

Like
0Likes
Like

Posted 05 June 2012 - 04:15 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS