Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steam Overlay fails to hook into Device Context Creation and SwapBuffers #143

Open
Vercidium opened this issue Aug 25, 2019 · 1 comment

Comments

@Vercidium
Copy link

I am attempting to integrate the Steam Overlay with my Windows game, however it doesn't render on top of the window.

I created a new blank test project and used another OpenGL C# wrapper, and the Steam Overlay worked successfully. I then switched this test project over to OpenGL.Net, however the Steam Overlay was invisible again.

The Steam Overlay works by hooking into the device creation, as well as hooking into the swap buffers call and doing its rendering there. The Steam documentation specifies that the overlay must be initialised 'prior to initializing the OpenGL/D3D device, otherwise it won't be able to hook the device creation'.

Is there anything happening in the way OpenGL.Net creates the device context that could be confusing the Steam Overlay, or causing it to hook into the wrong context?

@luca-piccioni
Copy link
Owner

luca-piccioni commented Aug 26, 2019

Maybe there is a conflict with the static constructor of Gl. Probably Steam hooking is based on DLL injection, wrapping well known libraries (such as opengl32.dll on Windows). But the Gl static constructor forces the loading of the libraries by creating a temporary GL context. You could try to disable the Initialize call in static constructor by using user environment variables prior to call any OpenGL.Net method.

Or.. are you running with EGL? Maybe EGL device context creation is not supported by Steam (I doubt it)...

Are you getting this problem on a specific platform? (i.e. Linux only)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants