Well, I would only use 1.2 defines from the GL headers. All the rest would be prefixed or suffixed by _WINE so no risk of conflicts.
original way to solve the problem, but as openGL1.2 is really a few things you can redefine all openGL. (and i think it will be better readable and workable than mixing GL_*_WINE and GL_*) And if you do that (no more official gl.h include) you shouldn't have anymore problem that you have used some GL_* only defined in you official gl.h but not openGL1.2 compliant
So even if the headers are ugly, I do not see how it could break things.
Yes, you are right, but i prefer code readable :)
i think you'll have many breakage :)
Well, if I do the following, I wonder how I could have breakages :-) :
#define GL_COMBINE_RGB_WINE 0x8571
I.e. I do not plan to use ANY pre-defined values from the header but to define them all myself.
So tell me where I could have breakage ?
so do it, i'll reuse it for d3d8 :) but do it for official OpenGL1.2 defines too (as i have commented before)
As you want, But for me, I think building with GL1.4 (last ans most complete) headers and detecting/activing caps on runtime it's a more proper solution (no more #ifdef/#define in code, only in d3dcore_gl.h definitions).
I cannot see how you can do this without shipping all the GL / GLX 1.4 headers with Wine itself.
As we used only a few parts of OpenGL1.4/GLX1.3 (and you a smaller one) we can only define in a "small" header what we need for what we used (i find it the more proper solution)
First, i have thought that shipping official openGL headers into wine was the better solution (for opengl dll and d3d*). But as they should be installed into <wineinstalldir>/include/wine now i think its better to only have a small header only for compilation.
If you plan to redefine stuff, this is exactly what I planned to do and you told that it would introduce breakage :-)
well, i don't want to use the user installed gl.h (it can introduce breakage with "beautifuls" old specific headers), and i don't want to have all opengl headers into wine tree (wine don't need to install it adn we don't need all defines).
Lionel
Raphael
original way to solve the problem, but as openGL1.2 is really a few things you can redefine all openGL. (and i think it will be better readable and workable than mixing GL_*_WINE and GL_*)
Well, we are already mixing GL_*_ARB, GL_*_EXT, GL_*_NV, ... Why not replace all these extensions (which may or may not be defined in the header files) by our own 'extension superset', called GL_*_WINE ?
And if you do that (no more official gl.h include) you shouldn't have anymore problem that you have used some GL_* only defined in you official gl.h but not openGL1.2 compliant
Well, the problem with the approach you are using now in D3D8 is that you are using the same name than the official one... And this could easily lead to 'name clashes' with #define or typedef renaming.
So either we do everything ourselves or we go my way, but I do not think your way is fixing all problems :-)
Yes, you are right, but i prefer code readable :)
What is non-readable in what I propose ? You find _WINE so ugly ? You prefer _ARB or _EXT ?
so do it, i'll reuse it for d3d8 :) but do it for official OpenGL1.2 defines too (as i have commented before)
Well, I already use 79 API calls in D3D7. And I did not count how many of the GL enums, but surely more.
I think it would really be a pain to re-do all this ourselves. So if we go the 'let's have our own extension files', at least take header files from an 'external vendor' (for example Mesa) and massage our code for it to work on these headers.
At least if we have breakage, it will always be internal and never due to external dependencies.
Or we could auto-generate these headers :-)
well, i don't want to use the user installed gl.h (it can introduce breakage with "beautifuls" old specific headers), and i don't want to have all opengl headers into wine tree (wine don't need to install it adn we don't need all defines).
Can you tell me any breakage introduced by old gl.h ? If you tell me 'They define extensions too !!!', this is not problem for my way as all extensions would be redefined with the _WINE suffix :-)
Lionel