Closed mosra closed 8 years ago
Magnum is not just an OpenGL wrapper
Switch to bgfx, and focus on these:
it has also math library, some ugly scenegraph implementation, data import framework etc.
You'll have more time to make that "ugly scenegraph implementation" pretty, and it will work everywhere... :)
I expected this exact comment, yeah :)
I expected this exact comment, yeah :)
I thought it's not obvious, since you haven't listed it. :)
Hello mosra,
If the first goal was to make an OpenGL wrapper + math library (like an OpenGL quickstarter for c++), I think that the next step would be to define the next goal. I don't know which option would be best, I think you should pick the one that will seems to be the most fun/enriching/profitable for you.
I would add an option: Stick with the code, and target only the web, though Emscriptem, as WebGL will probably stick with GLES. You'd keep your current goal, but you limit all users to web only. There's tons of library with this goal, but in JavaScript, none in C++ (Yeah UE4 could do that, but it also cover the current features of Magnum though, but you'd be just lighter & simpler, maybe the JS conversion of Unity or UE4 is too heavy).
Bye, JB.
I haven't used Magnum nearly at all, but have been looking at it with great interest lately. I was hoping to move to Magnum from Irrlicht (easy to use "high-performance" graphics engine, supports many APIs but originally designed around D3D9), which I was using with OpenGL. Because of Irrlichts support for very old OpenGL versions and D3D9 oriented design, Magnum sounds like a charm, being GL only and completely unsupportive of versions which couldn't run a distortion shader (and therefore I don't care about). Also, bye undocumented euler rotations, hello quaternions! :D And C++11!
Create entirely new API as tiny wrapper around Vulkan. Probably as a compile-time option to switch between the two backends
For me seems like the most flexible option. When the time comes, dropping the GL support is super simple with this and also, this would not hold down the Vulkan API, since no compromises would have to be made. And after all, since "Vulkan only" seems to be the end goal for the (distant) future, compromises don't really seem like an option.
Magnum strengths as I see them:
If you were going for a [partial?] rewrite, things I would like to see:
I'm guessing uptake of Vulkan is not going to be overnight. We're going to be left with a lot of legacy OpenGL for a while to come yet, so let's not rush to abandon Magnum. Maybe we don't want to be implementing new OpenGL extensions for the moment, but there's other features to be worked on in Magnum?
I read this, this morning, I think at least some of it is applicable to Magnum: http://jmonkeyengine.org/301602/in-the-age-of-free-aaa-game-engines-are-we-still-relevant/
Thanks for the insightful inputs, everyone.
I did some reading, actually a lot of reading, about data-oriented design, Entity-Component systems, SIMD, Vulkan/AZDO, proper GPU feeding etc. Vulkan still has some time to be released, so this is my take on things:
What I won't do, probably:
When these are finished, I think that the lib will be ready for adopting the new Vulkan ideas and dropping the GL ways of thinking along the way. Because of WebGL it would still need to keep some sort of GL compatibility, but hopefully the GL could be wrapped in a Vulkan-compatible package.
Vulkan has notions of textures and buffers, as well as vertex buffer and index buffer.
The decision is to have separate OpenGL and Vulkan API wrappers with no abstraction covering both, details in #147, so closing this one.
As the news about the OpenGL successor are starting to appear, I'm considering what to do next. I deliberately didn't implement any new GL-related functionality lately, partly because I'm putting all available resources into finally finishing #44 and partly because I didn't want to accidentally create APIs that would be incompatible with the approaches found in glNext, now called Vulkan.
Magnum is not just an OpenGL wrapper, it has also math library, some ugly scenegraph implementation, data import framework etc. These things are not dependent on the underlying graphics API and thus the following decisions should not influence them (besides the effort to make stuff more data-oriented).
So, these are the possible next steps:
Try to cram Vulkan into current API.(This is a bad idea, because from the sources I found, Vulkan has no notion of textures, buffers or anything else, thus I would need to invent new abstractions, which would make stuff more limited that it needs to be.)Drop everything related to OpenGL (and thus drop support for all pre-ES3.1 hardware and HTML5, because Vulkan doesn't seem to target also the web).(Not an option, web is very relevant today).Create entirely new higher-level API abstracting both OpenGL and Vulkan.Magnum's original design decision was to stick with one family of APIs (OpenGL/GLES/WebGL) and not try to make abstractions that would work also with DirectX (9, 10, 11, 12), AMD's Mantle or Apple's Metal. This allowed me to have a very thin abstraction layer, not limiting the user in any way and keeping the library fairly tiny. Abstracting the stuff out makes this just yet another 3D engine and then there is no point in using Magnum instead of say Unreal 4, providing it is now completely free.NV_command_list
and Vulkan approaches more closely (ability to compile state objects, command buffers, use uniform buffers, bindless resources etc.). For older hardware or WebGL the user would still be able to use the old approaches. Try to converge the new functionality with Vulkan as much as possible so it is possible for the user to switch to it without much pain.In any case, the GL API is deemed to be removed at some point in the future, staying with Vulkan backend only.
Thoughts?