diff options
author | Mike Erwin <significant.bit@gmail.com> | 2015-12-06 22:29:23 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2015-12-07 02:02:07 +0300 |
commit | 1858823d3b9d7488ada8400393cb97efe2468efd (patch) | |
tree | a112d89d3f102d54c4745cabe72bc3fe0a2341ba /intern/ghost | |
parent | ffabd037bbdd807c3b2ff179312a3cc2b379d2a9 (diff) |
OpenGL: request version 2.1 when creating context on Windows
In practice this gives us a context that is *compatible* with GL 2.1. On
my machine it gives a GL 3.3 or 4.3 compatibility profile context,
depending on graphics card installed.
Also fixed enum for core profile (not used yet).
Also added option for GL 3.2 compatibility profile. This will be useful
during Blender 2.8 development, until we are able to use the core
profile. On my machine this gives exactly a GL 3.2 compatibility profile
context, not 3.3 or 4.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 54ac9d27bc7..7247753c655 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -626,7 +626,7 @@ GHOST_Context *GHOST_WindowWin32::newDrawingContext(GHOST_TDrawingContextType ty m_wantNumOfAASamples, m_hWnd, m_hDC, - WGL_CONTEXT_OPENGL_CORE_PROFILE_BIT, + WGL_CONTEXT_CORE_PROFILE_BIT_ARB, 3, 2, GHOST_OPENGL_WGL_CONTEXT_FLAGS, GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY); @@ -646,8 +646,14 @@ GHOST_Context *GHOST_WindowWin32::newDrawingContext(GHOST_TDrawingContextType ty m_wantNumOfAASamples, m_hWnd, m_hDC, +#if 1 0, // profile bit - 0, 0, + 2, 1, // GL version requested +#else + // switch to this for Blender 2.8 development + WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, + 3, 2, +#endif GHOST_OPENGL_WGL_CONTEXT_FLAGS, GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY); #else @@ -684,8 +690,14 @@ GHOST_Context *GHOST_WindowWin32::newDrawingContext(GHOST_TDrawingContextType ty m_wantNumOfAASamples, m_hWnd, m_hDC, +#if 1 0, // profile bit - 0, 0, + 2, 1, // GL version requested +#else + // switch to this for Blender 2.8 development + EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT, + 3, 2, +#endif GHOST_OPENGL_EGL_CONTEXT_FLAGS, GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY, EGL_OPENGL_API); |