Download

How does one control what opengl context an application can see?

I am doing some testing using some third party libraries, but I ran into a problem. It complains about not finding the opengl context when called through unreal.
The same code worked fine outside of unreal as a standalone system, but after being put into unreal and called from blueprints the errors occurs.

I have been stumped as to what is causing this error. Until now I have never had any problems with the applications I have written not finding the opengl context so I have no idea what causes it, how to fix it or if it is even possible to provide it inside unreal.

What I have tried is:

  • Going to project settings and enable opengl3 and 4.
  • Append the launch option “-opengl3” or “-opengl4”.
  • Package and launch the game using the above settings and launch options.

Further, according to this site creating the context is just the standard procedure of binding the different opengl functions to local function pointers and calling “wglCreateContext()” or a similar function.

Now, the post does say that

Can it be that it complains about not finding the context because it somehow crashes with Unreal’s systems somehow? I called the test function on the gamethread so the last line indicates that it should be working.

Any help is appreciated.

Thank you.