Lionel Ulmer lionel.ulmer@free.fr writes:
In the current code, there seems to be two different mechanisms for driver calling :
one that is 'GDI' specific with the 'dc->funcs->pFUNC_NAME' sort of calls
the other for 'USER' with 'USER_Driver.pFUNC_NAME'
So which one of the two methods should I use the 'WGL' that is neither in GDI nor in USER ?
You can't really use either. The GDI one requires calling DC_GetDCPtr which you cannot do from outside GDI, and the USER one requires a reference to a global variable that isn't visible outside USER.
A possible way is to use the Escape function and add a few x11drv-specific escape codes. But first it would probably be a good thing to check how opengl32 is implemented under Windows; I have no idea how it works, but it probably needs some way to communicate with the graphics driver, and we could use the same mechanism.
You can't really use either. The GDI one requires calling DC_GetDCPtr which you cannot do from outside GDI, and the USER one requires a reference to a global variable that isn't visible outside USER.
Hmmm, I should have checked more :-)
A possible way is to use the Escape function and add a few x11drv-specific escape codes. But first it would probably be a good thing to check how opengl32 is implemented under Windows; I have no idea how it works, but it probably needs some way to communicate with the graphics driver, and we could use the same mechanism.
Well, the only thing I know for sure about how OpenGL is done in Windows is that you load one DLL (opengl32.dll). This DLL support the standard software rendering mode but can also load an 'ICD' (by looking at the 'OpenGLdrivers' key in the system registry) that is the driver specific to the card.
But after, how the software mode actually work or how this ICD (for my card, a DLL) interacts with the drivers, I have no idea...
Lionel