luca-piccioni / OpenGL.Net

Modern OpenGL bindings for C#.
MIT License
570 stars 109 forks source link

Reconsider approach to choosing Device Contexts to Control #19

Closed johnfredcee closed 7 years ago

johnfredcee commented 7 years ago

GLControl has a bunch of design time properties that describe the needed pixel format. This was actually a hindrance to getting it working on my machine as the device did not accept the chosen pixel format and the control threw an exception.

I don't know that much about XWindows but is there an equivalent to the wgl ChoosePixelFormat function where the device chooses the pixel format rather than has it imposed on it? This would be more robust.

luca-piccioni commented 7 years ago

I understand that the pixel format selection could be a pain (actually it is), but I have to partially disagree. The reasons could be explained by the following points:

Probably it would be more useful to present the pixel format issue with:

In this way I can understand what's going on, and consequently find issues in my code.