Closed iamgreaser closed 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.
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.
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!
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: