Vector versus raster graphics in openGL

Posts: 321
Joined: 2004.10
Post: #1
I maybe on thin ice here, so please excuse me if I say anything stupid.

I've been using RGBA textures for complex 2D geometries. Well, more
complex than just rectangles and circles. Up to now I've been creating
vector drawings in Adobe Illustrator and then exporting them to the raster
format PNG. I then fire up Adobe photoshop, fill in the geometry
with black (opaque), fill in the anti-geometry with white (transparent) and
save the data off for a texture. Typically, these are 1024x256, or
(1024 *256 * 4) = 1,048,000 bytes.

I then read these geometric textures in and then "cover" them over with
another skin texture with multi-texturing. I suppose this would be
analogous to reupholstering a chair with new fabric.

I was looking at a StanfordBunny demo just now, and noticed the use of
display lists. Seems like I could (in theory) replace the "outline" textures,
as described in second paragraph, with a pre-compliled display list of GL_TRIANGLES or GL_LINES.

First off, Is this even doable? If I used GL_LINES, this would be creating a
mesh? Could I then overlay my "skin" textures over it?

If so, the next question would be is there some tool or program which
could generate the data points for the outline of the geometric shape
either from the vector or raster files? I'd image it would be preposterous
to try and do this manually?

Hope this makes sense. Thanks.
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
There are even libraries out there that can render SVG files directly to OpenGL, eg:
Quote this message in a reply
Posts: 321
Joined: 2004.10
Post: #3
I've been looking at both the ngl and nui api and I can't see
(understand) which calls to make that would render SVG
files to openGL?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Reflect a vector in relation to another vector ipeku 4 8,188 Dec 12, 2011 07:17 AM
Last Post: ipeku
  New to obj-c and have no idea where to start: vector graphics billybob 1 3,827 May 27, 2009 11:17 AM
Last Post: billybob
  OpenGL raster MadPsycho 5 5,896 Jul 26, 2008 10:19 AM
Last Post: MadPsycho
  Vector graphics rendering: Best approach? Luipaard 5 7,399 Sep 28, 2007 08:40 AM
Last Post: TomorrowPlusX
  2d vector graphics game: GL or Flash? Krazygluon 1 4,249 Oct 30, 2006 09:57 PM
Last Post: maximile