sulix / opentk-sdl2

An (unfinished) SDL2 backend for OpenTK
5 stars 0 forks source link

Setting PreferredBackBufferHeight doesn't work with Monogame on Linux #2

Open 3vi1 opened 10 years ago

3vi1 commented 10 years ago

Using this DLLwith a bare-bones Monogame project, I find that it does fix the problem Monogame has with setting the PreferredBackBufferWidth. This doesn't work with the stock OpenTK.dll, but does work when you replace it with the SDL2 OpenTK DLL.

However, seting the PreferredBackBufferHeight.still has no effect.

sulix commented 10 years ago

Wow: I didn't think anyone was still using this! I'm now focusing work on monogame-sdl2 (https://github.com/flibitijibibo/MonoGame ) and SDL2# (https://github.com/flibitijibibo/SDL2-CS ), which are much more complete and have had several games shipped (including FEZ from the current Humble Bundle).

If you still want to use opentk-sdl2, I have a couple of ideas as to what the problem might be.

Have you applied the modeswitching patch from https://bugzilla.libsdl.org/show_bug.cgi?id=1742 to the version of SDL2 you're using? opentk-sdl2 currently requires this (see https://github.com/sulix/opentk-sdl2/blob/master/Source/OpenTK/Platform/SDL2/SDL2GLNative.cs#L284), but it can be worked around. The older code (which didn't require the patch) was changed in https://github.com/sulix/opentk-sdl2/commit/1501182265e30c6878c16408267a14995a030f8a

I think that's probably the issue, but — just to confirm — are you using the accompanying monogame branch https://github.com/sulix/MonoGame/tree/opentk-sdl2 ?

— David

3vi1 commented 10 years ago

I'm now focusing work on monogame-sdl2

That's eventually where I ended up too, as it sets the width/height fine. Thank you for responding, though!