What is the future of medium to large Xojo 3D graphics projects on Windows, Mac, and Linux? Will it all eventually be a Canvas, or will each platform have their own version for graphics, such as DirectX (Windows), Metal (Mac), and OpenGL (Linux) that we, the programmers, will need to create individually?
The reason that I am asking this question is that there are so many great programmers in the Xojo forums that have read many articles that I couldnt possibly read because of time. When I need to create animation, I am finding that my projects are continuously needing specific individualized code for each platform. Below is an initial list of benefits and baggage for some possible options:
Canvas
Able to work on all Xojo platforms
Has minimal drawing code when compared to a library such as OpenGL
Much of the code and mathematics will need to be developed by the programmer
OpenGL
Being discontinued on Mac
Only early versions (1.x) are on Windows 10
OpenGL is usually good for each Linux OS
Linux OS versions dont typically work well with each other (example: Ubuntu vs Mint vs etc)
OpenGL looks like it is still being updated with version 4.6 being released on 31 July 2017
Vulkan is not backwards compatible with existing OpenGL versions
Vulkan is the new OpenGL
Vulkan will typically take much more coding to create the same program (Example: Hello World could take 100 lines of code on Vulkan and 10 lines of code on OpenGL)
OS Specific Libraries
Direct X is preferred on Windows 10
Metal is preferred on Mac
OpenGL is preferred on Linux
There is no right or wrong answer when giving your opinion, and the options are large. When I am starting on a new 3D project, what would be a good programming option so that my code is somewhat future-proof: Canvas, develop 3 OS specific programs, or something else?
2D or 3D, it ideally would be a canvas, with all the mechanics transparent to the developer, as in they wouldn’t need to have 100’s of macOS declares plus 100’s of Windows declares, to quote Apple “It just works” (ok, maybe paraphrase)
A transparent implementation of SceneKit and SpriteKit for Xojo XPlat would be AWESOME
You may need to step outside of Xojo to accomplish this.
We have a group in-house working on a 3D project with simple object rotation motion and flying movement animations. After working through a number of development frameworks - including Xojo, they selected Unity and C#/Mono. Even though it’s not a game, the Unity framework is providing consistent look and feel across all platforms.
WRT Norman’s comments and links to Vulkan options, we found Vulkan’s OpenGL implementation to still be a moving target up until June when the team settled on Unity. Molten seems to be a pretty solid option - but they’re only on Mac OS (and iOS).
Molten is a Vulkan implementation for iOS macOS that rests on top of Metal so it is, by definition platform, specific since Metal is Apple technology
The rest of Vulkan isnt though
Vulkan, like early iterations of OpenGL, is still evolving
I only mentioned Molten specifically in contrasting the Molten version against the generic drivers / SDK state. MoltenGL is far more stable than the generic Vulkan SDKs that the team tested.
If Vulkan can get buy-in from hardware manufactures (as per their vision), which I hope they do, then they have the potential to become the “goto” (in a good sense) tec for advanced graphics rendering and parallel processing across all platforms.
I like what you are saying about this Dave. The Canvas is truly cross-platform, and it would be nice to have much of the drawing math already configured. This is my lazy-way of saying that it would be nice for the Canvas to be like-a-version of Opengl or Vulkan libraries. We definitely do not need another disruptive technology to create another drawing ‘standard’, as there seems to be lots of disruption happening now.
[quote=349678:@Tim Jones]You may need to step outside of Xojo to accomplish this.
We have a group in-house working on a 3D project with simple object rotation motion and flying movement animations. After working through a number of development frameworks - including Xojo, they selected Unity and C#/Mono. Even though it’s not a game, the Unity framework is providing consistent look and feel across all platforms.
WRT Norman’s comments and links to Vulkan options, we found Vulkan’s OpenGL implementation to still be a moving target up until June when the team settled on Unity. Molten seems to be a pretty solid option - but they’re only on Mac OS (and iOS).[/quote]
I have played (pun intended) with Vulkan a little-bit and it looks like it will be a solid development platform in the future, and I agree with your comment that implementation seems to be a moving-target.
Unity does seem to be an option for cross-platform development, as I have taken a few courses on it and the platform seems fairly solid and mature.
My preference is that I would prefer to use Xojo, although it will probably require more time, energy, and monetary dedication to make it work.
My guess would be that someone could begin the journey of creating a Vulkan Control with the use of the Canvas Control? Is there some open-source old code from the days when OpenGLSurface was first created in RealBasic that can be used with hooks that I could adapt for Vulkan?
I would like to understand SPIR-V a little more, as I am likely misunderstanding something. Is SPIR-V a library that helps programmers implement Vulkan? From a very broad perspective, would SPIR-V with Vulkan kind-of be similar to a GLUT-like library for OpenGL?
[quote=349669:@Eugene Dakin]OpenGL
Only early versions (1.x) are on Windows 10[/quote]
That’s not accurate. You’d only end up with OpenGL 1.x on Windows 10 if you had zero video card driver support. In fact, one improvement for video that windows 10 has made is that it (normally) handles driver installation. In many tests, we’ve found it quite common to get OpenGL 2.1 under Windows 10, even on low-end hardware.
I’m going through the same questions, and one additional option I’m considering is using WebGL inside a HTMLViewer. One advantage of this technique is that all of the low-level OpenGL stuff is handled by the web renderer (WebKit on macOS, IE11 on Windows…) Lots of disadvantages as well - a bit one: Is WebGL going to survive?
I find this quite interesting and exciting that you’ve found a way to get OpenGL 2.1 under Windows 10. I was only able to get up-to OpenGL 1.3 working with Xojo last year. Have you been able to get 2.1 version working with Xojo on Windows 10? If so, how? Thanks for sharing.