Skip to main content
GameDev.net gamedev.net
🔒 Locked

SDL_gfx Primitives

Started by Elbo Jan 29, 2010 at 6:54 PM 0 replies 700+ views
Original Post
Elbo
Elbo
Is there a way to turn a primitive shape drawn with SDL_gfx into a surface? I've searched everywhere and can't find anything about it so I assume it's not possible but I'm not sure.
fcoelho
fcoelho
Just create a separate surface with SDL_CreateRGBSurface and feed it into the SDL_Surface argument of the SDL_gfx function you are calling. When you want to display it, blit it to the screen surface. Just make sure that the surface you create is large enough to hold the primitive you are rendering.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.