# OpenGL delay load issue

**URL:** https://discourse.vtk.org/t/opengl-delay-load-issue/3610
**Category:** Support
**Created:** [June 22, 2020, 9:11am UTC](https://discourse.vtk.org/t/opengl-delay-load-issue/3610 "2020-06-22T09:11:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![FS\_K](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/779978/32.png) [@FS\_K](https://discourse.vtk.org/u/FS_K)
#### Post date: [June 22, 2020, 9:11am UTC](https://discourse.vtk.org/t/opengl-delay-load-issue/3610/1 "2020-06-22T09:11:30Z")

</div>

I’m using VTK 8.2 and I want to use OpenGL delay load to be able to switch in software rendering when necessary.

I followed the steps described here: [https://vtk.org/doc/nightly/html/vtkTestOpenGLVersion\_8h.html#a863adbac1bada4e7b1e08dce13170631](https://vtk.org/doc/nightly/html/vtkTestOpenGLVersion_8h.html#a863adbac1bada4e7b1e08dce13170631)

Our applications are launched through a “launcher” which wrapps original exe in a another thread.

Using OpenGL delay load works when used directly on the exe, but when used in another thread it’s KO.

To test further more I put mesa dlls directly in exe folder to force software mode and I disabled call to [**HandleOpenGL32Issues**](https://vtk.org/doc/nightly/html/vtkTestOpenGLVersion_8h.html#a863adbac1bada4e7b1e08dce13170631).

With vtk built WITHOUT OpenGL delay load, it is OK either when I launch exe directly or through the launcher.

But with vtk built WITH OpenGL delay load, it is OK only when I launch exe directly, through the launcher it is KO.

So is the fact that my application is launched through another thread that is causing OpenGL dlls loading fail ?

How can I solve this issue ?

Thank you,

Best regards,

Frédéric
