hi
is there any tool that can generate these kind of code?
a polygon creator or something like ?


_glColor3f 1.0f, 0.0f, 0.0f
_glVertex3f 0.0f, 1.0f, 0.0f
_glColor3f 0.0f, 1.0f, 0.0f
_glVertex3f -1.0f,-1.0f, 1.0f
_glColor3f 0.0f, 0.0f, 1.0f
_glVertex3f 1.0f,-1.0f, 1.0f

_glColor3f 1.0f, 0.0f, 0.0f
_glVertex3f 0.0f, 1.0f, 0.0f
_glColor3f 0.0f, 0.0f, 1.0f
_glVertex3f 1.0f,-1.0f, 1.0f
_glColor3f 0.0f, 1.0f, 0.0f
_glVertex3f 1.0f,-1.0f,-1.0f


thx for the help :)
Posted on 2005-01-09 21:55:52 by GR33d
I'd recommend Milkshape3D for doing that. The fileformat is quite easy, so you can write your own importer. There will be lot of more info in the file though, but you can ignore that (like animation info). But well, it doesn't store the color components of vertices, only position, normal & texture coordinates.
Posted on 2005-01-10 03:32:45 by lifewire
I recommend graph paper for beginners.
Posted on 2005-01-10 21:57:50 by Homer
graph paper ? ??
Posted on 2005-01-11 12:08:17 by GR33d
the kind of paper with perpendicular lines crossing each other at regular intervals. people always tend to draw graphs on it, hence the name graph paper. (that could be a nice definition for graph paper, couldn't it? :-D )
Posted on 2005-01-12 11:40:43 by lifewire
ya right : /
Posted on 2005-01-12 14:55:03 by GR33d
Use graph paper to help design 2D polygons.
The way that OpenGL is set up, it's far easier to "construct" 3D polygons from several 2D polygons than to design the 3D polygons by hand..
For example to make a 3D cube, you design a 2D square, then you write OpenGL code which draws several of these 2D squares, rotating around axes by 90 degrees inbetween each... make sense?
Taking it further:
Once you've done that, you can move the code you used to draw this object into a "drawlist object" created on startup, then use a single line to draw the object.
A common example of DrawList is a picket fence.
You design a single Picket, then you create a DrawList that draws N pickets.
Another common example is the construction of a Castle with four Towers.
You design a single Tower, then use a DrawList to draw four of them at different places.
This is the beginning of an Object management system as well :)
Posted on 2005-01-12 22:17:25 by Homer