Hallo, Chris McCormick hat gesagt: // Chris McCormick wrote:
To address this I've been experimenting with a method of storing geometry in a [list] which is sent through geometry modifying "effects" to an object [sx/blob] which draws geometry represented as a list of verticies of triangles, to the screen. It's pretty crap and slow, and I'd love to know if there is already a better way of doing this.
Attached is a variation of your blob which I called "anyblob" because it uses the "any-trick" to render multiple objects using just a single gemhead. Note how [repeat] is replaced by [any] from IEMlib. The only change necessary on the outside is, that you send 9-element triangle lists seperately instead of packing them all into one long list. This has several advantages. First it allows one to skip all this [list split 9] business as well as the counting of the length of the list. Second you can store the list of vertices into a [textfile] with one triangle for each line and advance through it with [next(. Third: With some more work it should possible to store single vertices with 3 coordinates on each line in this textfile, and then collect 3 lines on every gemhead-bang. This basically is the format of an *.obj-file, where vertices start with the letter "v". So with
[textfile] <= open some obj-file here | [route v] | [sx/objblob] <= TODO
you would get a custom, primitive obj-file renderer.
Frank Barknecht _ ______footils.org_ __goto10.org__