This is a quick note that I’ve setup a repository on GitHub specifically for code and examples related to MonoGame WinForms controls. You can find it here:
The repository unifies all of the code that I’ve put up as separate downloadable projects in each post. The code is also improved in some places, and includes better example projects. Since I’ve caught myself re-implementing the basic control code several times now in projects, I’ve setup the main control project as a standalone library that you can include and extend. You can still use the code as a template to directly copy into your projects if that fits better.
So far I’ve written three entries on this topic. Two of them have been prompted by your questions and feedback. The WinForms controls repository will be updated accordingly I write new entries, although it may continue to see minor changes regardless.
Looking forward, MonoGame is still undergoing plenty of turmoil. There’s several different proposals on the table that could invalidate some or all of the code I’ve put up so far. Two particular items that have caught my eye:
There’s an open pull request on multi-GameWindow support for DirectX. It looks like this will be included, and then will be applied to OpenGL. This could result in DirectX-controls becoming viable. It could result in a better way of managing OpenGL controls down the road. It may also remove the need to implement our own version of the Game class. That would be very welcome, but I don’t have any answers yet.
There’s open debate on whether SDL2 could replace OpenTK as an underlying game/rendering platform. This would likely invalidate everything that has been put up so far, since we currently depend on OpenTK’s GLControl and what it exposes in terms of OpenGL context and APIs. It’s unclear if there will be an SDL2 equivalent that works without hacking into MonoGame and/or SDL2.
These are issues I’m keeping an eye on. If you have more information on these topics, feel free to share in the comments.