Hello everybody,
I need a library/framework for working with 3D graphics, but through an abstraction layer, directly OpenGl Too long and complicated for me.
Therefore, I settled on a choice between two libraries:
-raylib
-OpenFramework
Let me please have a few questions about the OpenFramework library:
- Tell me please, do I understand correctly that 3D visualization with the creation of a Window written using the 3D module OpenFramework - Will run without rewriting the code on all specified Operating systems - Windows, Linux, MacOs, Android and Ios?
If yes, how does it work? After all, for example, Android and Ios Do not support OpenGl functions, for example, version 4.3, how do different versions fit together for different platforms?
- And in fact the same question is of interest about webassembly: 3D visualization with the creation of a Window written using the 3D module OpenFramework - will it compile WITHOUT REWRITING already written code through Emescripten for the Web?
Yes the code works the same for all platforms.
I’ll try to explain how it works, but maybe it is not 100% correct.
from what I understand you call OF commands and functions, and they call the correct OpenGL, openGLES instructions to draw what you want in the platform you are working with.
Emscripten works the same, same code will work on browser,
https://nickhardeman.com/temp/OFExamples/3DPrimitivesExample/3DPrimitivesExample.html
1 Like
Thank you!
Do I understand correctly that the code written in OF will need to be compiled correctly for Emesscripten?
Could you suggest an example of such a compilation?
Because I don’t quite understand it.
If to compile for platforms - Windows, Linux, Android or Ios - you have to compile in the appropriate compiler and then the code through “ifdef” will be able to determine the platforms and substitute the appropriate version of OpenGl, then I can’t understand how this happens with Emescripten, because Emescripten is not a platform, and I don’t understand how inside the OF code it will be determined and the corresponding version of OpenGl will be substituted.