Ok, I’m sure we’d all like to say ‘the object model’ but that isn’t going to happen. So for OpenGL 3.1 I’d like:
-
Make direct_state_access core.
-
A function like:
void ProgramSamplerEXT(uint program, int location, int texture);
So we can bypass the whole texture-units/textures/samplers annoyance and set which texture we’d like which sampler to use.
- A replacement for Vertex Array Object. So we can bind the entire layout in one go. It’s very annoying to have to use VertexAttribPointer every time. E.g:
struct Vertex
{
float x, y, z, nx, ny, nz, tx, ty;
};
would look like:
glGenVertexArrayObject(1, &vao);
glSetVertexAttributeObject(vao, 0, 0, 32, 3, GL_FLOAT, GL_FALSE);
glSetVertexAttributeObject(vao, 1, 12, 32, 3, GL_FLOAT, GL_FALSE);
glSetVertexAttributeObject(vao, 2, 24, 32, 2, GL_FLOAT, GL_FALSE);
where glSetVertexAttributeObject is defined as:
glSetVertexAttributeObject(vao, attributeNumber, offset, stride, size, type, normalise);
(offset is the distance from the start of the buffer, as we can’t do fancy pointer fiddling)
We’ll also need a couple of functions for binding a buffer to the vertex array object or binding a buffer to each attribute individually.
Thanks & Regards
elFarto