sulix / opentk-sdl2 Goto Github PK
View Code? Open in Web Editor NEWAn (unfinished) SDL2 backend for OpenTK
An (unfinished) SDL2 backend for OpenTK
I'll likely do this myself, but if someone wants to do this even sooner than me, here's the deal:
The joystick API for OpenTK is crap. To get any good mileage out of SDL2 we'd basically have to write our own API for OpenTK that revolves around us.
Oh, wait, we can do that! Because OpenTK has a GamePad driver in their Input module and it's totally unimplemented.
I say we just rip off SDL2's GameController API in there, then our SDL2 driver will map cleanly to it. It's also a hell of a lot nicer when we implement SDL2 controllers in MonoGame.
Here's the SDL2_GameController header, for reference:
http://hg.libsdl.org/SDL/file/700f1b25f77f/include/SDL_gamecontroller.h
If it turns out GameController isn't as flexible as I want it to be (axis flipping is one I'm concerned about...) it would still work pretty well with SDL_joystick.
Using this DLLwith a bare-bones Monogame project, I find that it does fix the problem Monogame has with setting the PreferredBackBuffer_Width_. This doesn't work with the stock OpenTK.dll, but does work when you replace it with the SDL2 OpenTK DLL.
However, seting the PreferredBackBuffer_Height_.still has no effect.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.