On 5 January 2015 at 17:17, Matteo Bruni mbruni@codeweavers.com wrote:
This kind of thing doesn't exactly fill me with joy, but I guess the alternatives wouldn't be much better.
Any reason this can't be part of load_gl_funcs()? (And while we're touching load_gl_funcs(), I don't see much of a reason we couldn't just inline GL_EXT_FUNCS_GEN these days.)
It would probably be nice to note the exact GL version where the function entered core GL.
2015-01-05 18:32 GMT+01:00 Henri Verbeet hverbeet@gmail.com:
Yeah, this is what I came up after a while and it looks better than my previous approaches. Also, glShaderSource and glTexImage3D will additionally need a cast (for trivial reasons, but still...) so it's going to get even funnier...
At this point, not really. I'm going to move it there and inline GL_EXT_FUNCS_GEN.
Good idea. I think I'm going to add a comment next to each line (while keeping this entire "core" section sorted alphabetically), as opposed to splitting the new section by version.
On 5 January 2015 at 21:01, Matteo Bruni matteo.mystral@gmail.com wrote:
previous approaches. Also, glShaderSource and glTexImage3D will additionally need a cast (for trivial reasons, but still...) so it's
This is on a bit of a tangent, but the GLuint vs. GLhandleARB difference may not be so trivial. I'm told that on MacOS X GLhandleARB is typedef'ed as "void *", as opposed to "unsigned int" everywhere else. Of course that wouldn't just be an issue for wined3d, but for opengl32 as well. Fortunately 64-bit isn't ever going to work on OS X anyway, I guess.
2015-01-05 21:18 GMT+01:00 Henri Verbeet hverbeet@gmail.com:
That's all true, but that's actually not the issue here. We already have
typedef unsigned int GLhandleARB;
hardcoded in include/wine/wgl.h so 64-bit GL on OS X has already been broken for a long time (on top of 64-bit Wine on OS X being non-existent, obviously).
Actually by going with this approach we avoid the GLhandleARB issue completely in wined3d if GL offers the core shader functions (which should be the case for any 2.0+ GL context).