hey mark!
On Jul 16, 2006, at 11:21 PM, Danks, Mark wrote:
I can explain why GEM is "backwards" :-) Warning: History lesson
for those who want to delete the spam now...
...I dig the history lessons, so keep 'em coming...
...snip...
One nice thing at the time is that it was trivial to modify the vertices with
objects. The tex_coord object is a legacy of this actually.
...snip...
It might be easier now to do it with the shape objects at the start with things like vertex buffers...but those didn't exist 10 years ago when I created GEM :-)
...this sounds exactly like the vertex_array stuff that cgc did some
years ago, tucked away in an esoteric cvs branch of gem: the main
holdup for awhile was a disagreement between iohannes and cgc &
me...Iohannes wanted to extend the buffer sizes to 4 for everything,
so that all buffers could be multiplied by each other (easy matrix
math)...cgc & I didn't like the wasted space, since you would never
have four normals, colors, indices, etc...last time we really
discussed it, iohannes basically threw his hands up, but then no-one
acted on it, as the idea had become quite cold, and somewhat
surpassed by doing the math in vertex programs instead of cpu-based
objects...
...anyway, just a week ago I finally started committing the stuff to
gem's cvs head...the basic idea is that you can create a buffer one
of two ways: either by loading a model ([vertex_model], thanx to
cgc!) or reading a table ([vertex_tabread], thanx to Io!)...then you
can use different objects to process the vertices cpu-side, or go
ahead and upload the buffers to the gpu ([vertex_draw])...at which
point you could insert [vertex_program]'s or [glsl_vertex]'s to do
the calculations on the gpu...
...well, that's the theory, but there are plenty of pitfalls in
practise, I'm sure...currently I'm expanding [vertex_tabread] to
accept single table messages (instead of "all tables at once" as it
is now), plus trying to create an auto-normal generation method,
along the lines of andrew glassner's "Building Vertex Normals from an
Unstructured Polygon List" method in Graphics Gems IV...
...or something like that :-)
jamie