iamgreaser / iceball

Open-source rewrite of the VOXLAP version of Ace of Spades.
http://iceball.build
GNU General Public License v3.0
113 stars 32 forks source link

Yes, we have no shader support #166

Closed iamgreaser closed 9 years ago

iamgreaser commented 9 years ago

Here's what this entails:

Extra formats should be declared something like this: "3v,3c,2t,2t,2t,2t,4a,4a,3a,1a,2a" - which would mean "3d vertex, 3d colour, 4 2d texcoords, a 4d vector for the first attribute, a 4d vector for the second attribute, and likewise with a 3d, a 1d, and a 2d vector."

Here's the functions I'm thinking of making:

iamgreaser commented 9 years ago

Multitexturing support is in place since 0.1.2-7. Currently we only use GL_MODULATE, and I have no intention of changing this seeing as it was only added as a stepping stone towards shader support.

Thus, client.gfx_tex_available(), the extra formats, and taking textures as a list for an argument are all done. What we need now is the client.glsl API stuff listed in the main part.

iamgreaser commented 9 years ago

Shader support in place since 0.1.2-8.

Only thing missing now is vertex attributes... do we really need these? They'll be a bit of a nuisance to implement as we have to map indices to indices in the shader.

Uniforms are in place so you can multitexture stuff somewhat properly.

iamgreaser commented 9 years ago

It appears that glBindAttribLocation is the way to go.

Proposed vertex attribute API - note, this may change, like, well, I think the API mentioned is slightly different from the actual API:

Let's finish this issue off once and for all!