[SDL] Best approach to Rendering Vector Graphics with SDL?

Sik the hedgehog sik.the.hedgehog at gmail.com
Tue Mar 12 22:30:47 PDT 2013

First obvious answer: OpenGL (or in the case of phones, OpenGL ES).
Then you can render pretty much any primitive you want with it.

Also there was a function proposed for the SDL renderers which lets
you draw arbitrary polygons (there are already some for some basic
primitives, as well as scaling bitmaps), I don't think it's in SDL yet

Note that ultimately you'd be drawing the primitives on your own,
there isn't e.g. a SDL_DrawSVG function or something like that. But
it's something, I suppose.

2013/3/13, bazz <mbazzinotti at gmail.com>:
> This question stems from my investigation into supporting my application on
> various screen resolutions. I recently discovered Vector graphics. Now, this
> is all really new to me, so incase I am missing anything I wanted to
> approach the Forum.
> Random Rant #1
> --
> Yeah Google is my best friend. ACtually that's probably true. So how about
> some semi-physical remote communication with other real people and their
> real opinions
> The Questions
> --
> 1. What is so great about vector art?
> - - well I suppose I have this one answered. It's basically a way of
> expressing graphics so that it can display at any resolution without loss of
> quality. Google for high-tech answer
> 2. How come I can't find anything on Displaying Vector Art with SDL??
> - - Something as useful as this sounds to be begging for association with
> SDL.... I mean ya I found some screwy libSVG library from 2008 or so.. but
> something so outdated I will prefer to stay away from. I am hoping for
> better answers/advice.
> My Circumstance
> --
> I am looking to support various devices such as PC, tablet, cell phone. Now
> the vector graphics looks like a great answer. From here I wonder what is
> the best move? I don't know much about vector graphic file formats. The
> benefits behind each one, or why cell phones are using a different SVG
> format, i think it's called tiny SVG?? (not sure, time is short)
> SVG library vs. Rasterization
> --
> this all depends on if SDL + Vector Graphics is a nice relationship. Because
> if not, the other resolution I see is to use some kind of Rasterizer, to at
> some point use the user's Screen resolution to rasterize SVG (or whatever
> vector format file extension) into png files. So it just boils down to
> whether I can render SVG directly inside/with my SDL code, using a library
> or whatever (portability is of course super necessary, as far as
> PC(win,mac,linux)/android/iOS). If I cannot find a way to directly do SVG
> renderings, then I figure I could rasterize to PNG somehow and then load the
> PNG's like my app already does.
> This is still rough in the dome. So I am really looking for answers. Can
> anyone help me out? Once again, I'm just trying to open up this treasure
> chest of universal screen support

More information about the SDL mailing list