Hi Stef,
I think that this is important that people can pick different
("compatible") driver/framework back-end.
You see if Woden is only built to work on something that does not
run on mac or windows then
it will be limited.
The problem is not Window or Mac. The problem is Linux.
��
We are having some discussion on this with Alex on this. I am going to try to remove the requirement on that extension by providing a fallback method for the selection, that does not require that extension. Then I will test it in my laptop by selecting the Intel driver (My laptop has the integrated Intel card in the CPU and a dedicated AMD graphics cards).
However Woden-Roassal relies a lot on hardware instancing support to be able to draw a lot of dynamic cubes. The alternative is to use a vertex buffer and index buffer that holds all of the transformed visible geometry that is updated on each frame in the worst case scenario. In the best case scenario (static cubes or objects), they are updated only once. This relies a lot on the CPU because all of the transformations has to be done manually on the CPU.
This is not a hardware problem, this is a drivers problem because OpenGL
is huge, complex, unefficient, does not represent the graphics
hardware. The Mesa Open Source guys are not able to keep pace with the
extension hell known as OpenGL. In Ubuntu 14.04 Mesa supports up until
OpenGL 3.0 compatibility profile, and OpenGL 3.1 core profile. The
current version of OpenGL is 4.5. Each version of OpenGL has a different
version of GLSL (OpenGL Shader Language), which makes harder to stick
with one reasonable subset and then support features depending on which
hardware you are running. In contrast, if you are developing for
Direct3D in Windows, you only need to choose between Direct3D 9(Windows
XP), 11(Vista I think/7/8), 12(Windows 10) and thats it. In Direct3D you
do not have to deal with hardware vendor extensions because there are
not extensions.
By using instancing, I have a buffer with the geometry of a single cube or shape. Then I have another buffer with the transformation and color of each cube or simple shape. When updating the position, size or color of an element I only have to change a single entry in this buffer.
The original Roassal 3D used a draw call per element. This more flexible, but a lot slower. 20.000 cubes in Roassal3D vs 300.000-600.000 in Woden-Roassal visibles at the same time. The overhead of a draw call is produced because some validations are made by the OpenGL driver for each draw call.
A draw call per-element is only reasonable when using Direct3D 12(Window), Metal(iOS, OS X) or Vulkan (Linux, Windows and mobiles) because there are designed to remove the overhead of draw calls. This is the approach that I am going to use in Woden 2 via an abstraction layer that I am making in C/C++ above the graphics API. Currently I have a backend for Direct3D 12 and OpenGL 4.x (it should be possible to use OpenGL 3.3, but I need to test it). I made the OpenGL backend because Vulkan has not been released yet. It is impossible to get the best performance by using the OpenGL backend because of its design. In theory it should be possible to make a backend for OpenGL 2.0 and OpenGL 2.0 ES, but it will be really hard to do. And it will not have a good performance.
Greetings,
Ronie