I mean... I understand (roughly) why the meshes are sent to gpu in this form, but at the same time...
...there's a reason why first thing I did when I was coding my procedural geometry generation library, was abstracting away all of that stuff...

...sadly, as many useful things, when I was looking for that lib on the start of this contract, I couldn't find it. and I was like "doesn't matter, this is a simple thing, using the library would be just a lazy overkill anyway".

well, fuck.
two hours of playing around with two fucking triangles, trying to figure out which indexes are pointing to the correct vertices in a list containing FOUR outline paths.
(lower inner, upper inner, lower outer, upper outer, exacly in this order).

i mean, yeah, it's actually pretty straightforward stuff... for someone not as dumb as me =D
you just have two offsets, one that jumps you to start of the upper path, another that jumps you to the start of the outer path, then it's just
0 + upOffset to get the vertex extruded upwards from the zeroth of the inner path, or
0 + outOffset to get the zeroth from the outer outline, or
0 + outOffset + upOffset, to get the one extruded from zeroth outer vertex...

and so on.
simple stuff, then you just replace the zero with loop control var, put them in the right order, and voilá! walls!
except... whatever, why am I describing in such detail, not necessary, you're not my rubber duck =D

in short, figuring out which fuckin vertex is which, when the list contains ...well, any number of points, and you need to plug the gap between last and first points of the paths, where you need to wrap around the list...

...has proven to be surprisingly hard for me.

funny how much I love doing these things with meshes, despite how bad I am at doing them, which makes me hate doing them despite loving it =D

  • 2
    It's generally a good idea to read the driver/OpenGL/DirectX documentation for all this stuff -beforehand-, lol.

    Even things like the way you send colours to the GPU matter. If you're using a high level library like SDL, setting the right texture format can speed up your operations, for example. It's all in the documentation.
  • 0

    your comment was well-meaning, and in many cases would be helpful, but in my context, completely useless...

    ...in retrospect, putting crucial context information into tags is probably not a good idea...

    (hint: unity. as in, Unity3D)
Your Job Suck?
Get a Better Job
Add Comment