December 5, 2017 at 4:38 pm #12148
There has been a recent change to opengl insteant of gles2. What will be it’s influence on MX2?
Will the mobile target will take advantage of that too?December 6, 2017 at 7:17 pm #12181
Windows mojo/mojo3d apps can now use ‘real’ opengl drivers, instead of the angle opengl->direct3d wrapper.
This will make them a little less ‘compatible’, but will give them access to more opengl extensions and improved performance (esp. instancing) in mojo3d. Mojo 2d performance seems to be about the same. Unfortunately, you currently still need to ship with angle dlls. I will fix this ASAP, hopefully upgrading to latest SDL2 will be enough which I plan to do soon.
To use real opengl drivers, add this before creating AppInstance object: SetConfig( “MOJO_OPENGL_PROFILE”,”compatibility” ). This is now the default for any app that #imports mojo3d.
You should be able to do this with any mojo/mojo3d app and everything should just work, assuming gl drivers are up to it. It also means you can now use ALL of opengl (well, up to 2.1 anyway, but it should be easy to add more as it’s all autogenerated) so if you’re writing something in pure opengl using GLWindow or something there is now much more of opengl available to you.
SetConfig/GetConfig are new, and behave pretty much the same as SetEnv/GetEnv, only they use an internal variable table instead of process env vars. I also removed the ‘appconfig’ map system altogether, you should SetConfig for setting app config vars now. See SetConfig help for more config vars. Need to fix some underscores in the docs there too…
I’ve also moved to opengl as the primary API. The gles20 module has been deprecated, people should import opengl now instead. You have access to the same functions as before (and much more) except glClearDepthf is now glClearDepth. If you were using the ‘Ex’ functions in gles20 (eg: glShaderSourceEx etc) please copy these into your own project code somewhere. I have not copied them to the new opengl module.
Will the mobile target will take advantage of that too?
Eventually sort of, as the opengl module is based on glew, which effectively supports gles3.0 so if/when mobile moves to gles3.0 I’ll be all set to go.
But in general, mobile only does GLES so having ‘desktop’ opengl available isn’t really helpful there. So this is much more of a desktop tweak.
You must be logged in to reply to this topic.