Open ghost opened 8 years ago
The font on the right is technically a texture. But some things are missing on the left. What steps did you follow to compile? How did you activate OpenGLES 2 ? Where is it running ?
MGui is not using shaders, so if you are running the full MaratisEditor using MES2Context, UI will not show. Font rendering is an exception because font rendering if not handle by MGui but by the general engine.
So I downloaded the engine from your repo then instead of having the default context renderer, OpenGL, I changed it to OpenGL ES 2 by adding it to cmakelist.txt in editor folder and adding some not implemented "virtual" functions to OpenGL ES 2 context. After that I was able to run the whole thing but without the images.
One more thing. I don't know exactly what you changed, but in this version of Maratis: https://github.com/dahnielson/Maratis I could easly navigate through the whole engine using QT Community, but now the build system has been changed and I can't jump to classes, nor I get colored syntax for classes within the engine :*( .
Ok, so it's because MGui is not using shaders, as editors are mainly used on desktop that still support fixed pipeline. Maratis player will work normally. Do you need the editor to run on mobile or tablet ?
That said, it's not very complex to have MGui working with OpenglES.
I'd like to be able to have everything running with openglES 2 that including the editor. Do you have any tips on how to approach this situation? I could try to figure out myself but it would be easy to get some guidance from you. :)
In MES2Context.cpp I started to write a basic fixed pipeline simulation. In "enableVertexArray" you can see that I started to bind attribute to a "simpleFX", that would be a minimal shader.
The other option is to port MGui to use shader-based pipeline. But the old code would need to be preserved if possible (with a #ifdef M_LEGACY), to keep an option for old hardware.
Everyone from 2007 till now has es 2 compatibility :)
MGui rendering code is mainly inside "MGui2d.cpp"
Well, true, a #ifdef doesn't cost much though.
Alright,I'm starting to understand how this is suppose to be working but the fact that I cant jump from classes to classes and that I cant see the syntax color from Maratis's classes bothers me :|.
Okay, #ifdef for the win.
I don't think I can help with QT Community, there is no conceptual difference with Dahnielson's Cmake. Your project must not be configured well, the paths probably...
Hmm...I doubt that since I needed to copy & paste the .so from engine/msdk and mgui inside the editor in order to have them working where on Dahnielson's Cmake they were copied automatically,the only thing I needed to do was just to put the assets folder. Plus the QT settings are exactly the same on both projects and yet they work differently.
How does QT Community completion works ? Does it depend on third party informations / doc / doxygen ?
No,it does not. I think the issue is related to the fact that the .so files are not build in the same directory so maybe that's why QT does not know where to take the information from.
I found the problem and now I'll change everything that's required and push it into my local repo and if you like the changes fell free to add it into the main repo.
Completion is almost always build from source only (not connected with libraries), so be sure that all MSDK headers are added to your project.
For example instead of having:
#include <MEngine.h>
I changed it into: #include "../../../MSDK/MEngine/Includes/MEngine.h"
and not everything works perfectly
Mh, not a good solution, you just need to add the path of MSDK somewhere in your project. In your settings something like "additional include path".