Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

New WindowsGL bindings cause PInvokeStackImbalance

$
0
0

@RHY3756547 wrote:

I just tried to run my game with the latest version of Monogame, with the custom bindings, but I ran into a serious problem pretty quickly. On the first GL call in GraphicsDevice.PlatformSetup() (GetInteger) calling GL corrupts the stack.

Changing all calling conventions to StdCall/Winapi instead of Cdecl actually makes this call and GL.GetString(StringName.Extensions).. Enough to run through PlatformInitialize, but quickly fails at a call to GL.DepthRange():

I looked into it a bit further and glDepthRange actually seems to accept (double, double) instead of (float, float)... and now the bindings work perfectly. What I'm worried about is the fact that I had to do this, and that my configuration may be incorrect.

I'm on Windows 10 x64. I've tried building the game for x86 and x64, and both bundled SDL dlls. I'm using a laptop with switchable graphics: Intel HD Graphics and NVIDIA GTX 870M.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles