That's fine then. I have no problem with breaking code that relies on buggy, incorrect behavior, as I said before.kazade wrote:To clarify, this won't break any code which is using OpenGL correctly, it would only break code if it is abusing the fact that until now glEnableClientState and glDisableClientState didn't do anything, by just not calling them.
The reason we need glEnableClientState and glDisableClientState to work is that before my patch set, if you wanted to draw an object with textures, and then draw another with just colours, there was no way to disable sending of texture coordinates (for example), which could cause buffer overruns if the second object had more indices as it would try to send texture coordinates for the previous object.
Although, it might be nice if in the future we had some way to head off such problems. For instance, perhaps by having an alternate initialization function with some parameter to say to use newer behavior, especially if there's a way to give similar behavior as what was done in the past. Basically, allowing you to specify to initialize to a specific API revision that might have some compatibility shims in place (so, in this case, I'd imagine the compatibility shim would be that instead of assuming that all client state is disabled as OpenGL requires, it assumes that it is all enabled as it appears is currently done). Basically, my thought would be that we essentially try to "freeze" the old API in place at each release of KOS/KGL. Perhaps that seems weird, but I know that I've seen people complain when we do fix buggy behavior because they did rely on the old behavior and they then have to spend a lot of time fixing things...
I know that, for instance, OpenGL on OS X allows you to hint that you want a certain version of the OpenGL spec supported at startup, and what I'm proposing is sorta like that, but with the understanding that we don't actually fully support OpenGL in the first place and that it's more about our older revisions than older standard revisions...
Note: I haven't looked at the patches or anything in here yet. I was away all weekend, and I have a bunch of other stuff to still catch up on at this point. I'll try to take a look later in the week, so keep us all updated on any future work.