st/wgl: Couple of fixes to opengl32.dll's wglCreateContext/wglDeleteContext dispatch

Graphics / Mesa 3D Graphics Library / Mesa - Jose Fonseca [vmware.com] - 15 April 2015 03:58 UTC

- Use GetModuleHandle instead of LoadLibrary to avoid incrementing the opengl32.dll reference count (otherwise the opengl32.dll will linger in memory forever.)

- Ensure we use our fake wglCreateContext/wglDeleteContext when using Mesa as a drop-in replacement for opengl32.dll

Untested. Just noticed by accident.

1aa5033 st/wgl: Couple of fixes to opengl32.dll's wglCreateContext/wglDeleteContext dispatch.
src/gallium/state_trackers/wgl/stw_ext_context.c | 18 +++++------
src/gallium/state_trackers/wgl/stw_ext_context.h | 36 ++++++++++++++++++++++
src/gallium/state_trackers/wgl/stw_wgl.c | 21 +++++++++++++
3 files changed, 66 insertions(+), 9 deletions(-)

Upstream: cgit.freedesktop.org


  • Share