Page MenuHome

Fix T51721 , OpenGL detection is broken on windows.
AbandonedPublic

Authored by Ray Molenkamp (LazyDodo) on Jun 24 2017, 10:12 PM.

Details

Summary

This diff , fixes the opengl context detection for blender 2.8 see T51721 for details of the problems, I have no idea how to submit a differential for a branch but luckily this seems to apply to master as well...

Diff Detail

Repository
rB Blender

Event Timeline

To submit a diff for a branch you do:
arc diff origin/blender2.8

Notes about style:

  • Multi-line ifs should have the braces aligned with the "if".
  • Lines shouldn't be longer than 120 chars.
  • Better to check (foo != NULL) instead of (!foo)

https://wiki.blender.org/index.php/Dev:Doc/Code_Style

Notes about the patch. This was made with the assumption that "for any given HDC, you may only call SetPixelFormat *ONCE* any future calls for the same HDC will fail.". Where did you get this information from?

Because if I here force the profile guessing to fail (e.g., replacing 4 by 6 as the major compatibility profile requested), it still works fine and fallback to the 3.3 core profile.

intern/ghost/intern/GHOST_ContextWGL.cpp
949

wrong identation for bool result.

Notes about the patch. This was made with the assumption that "for any given HDC, you may only call SetPixelFormat *ONCE* any future calls for the same HDC will fail.". Where did you get this information from?

https://msdn.microsoft.com/en-us/library/windows/desktop/dd369049(v=vs.85).aspx under remarks.

Committed on b43cdc91ce4.