ZGESensor library stopped working
Moderator: Moderators
ZGESensor library stopped working
Ville, I tried to recompile all ZGESensor demo projects with the latest ZGE beta and all stopped working - sensor data are not updated. Could you please detect the problem? Thanks.
It seems it stopped working when I made the change so that VBOs (and any OpenGL function) can be created in OnLoaded.
So now OnLoaded is called after the OpenGL context is created (just like on Windows) and for some reason this breaks the sensor library. Possibly because another thread is active when OpenGL runs. I tried switching back and then it works again (but vbos breaks).
I see you have optional logging in your library. Can you turn it on and verify that the functions get called correctly?
So now OnLoaded is called after the OpenGL context is created (just like on Windows) and for some reason this breaks the sensor library. Possibly because another thread is active when OpenGL runs. I tried switching back and then it works again (but vbos breaks).
I see you have optional logging in your library. Can you turn it on and verify that the functions get called correctly?
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
I did and it seems that all function calls from ZGE are correct, see the attached log file. Some functions, such as sensorGetName, return correct values. The problem is that the callback function getSensorEvents is not called and therefore does not update sensor data.VilleK wrote:I see you have optional logging in your library. Can you turn it on and verify that the functions get called correctly?
Ville, what about to move OnLoaded call before the OpenGL context is created and to initialize VBOs in an AppState?
- Attachments
-
- log.zip
- Sensor Demo 1 log
- (2.48 KiB) Downloaded 544 times
The problem with changing back to the old behavior is that ZGE on Windows allow OpenGL calls in OnLoaded so it would reduce compatibility.
I see in your code that you use LOOPER_ID=1. But most code I find (like here) instead use the LOOPER_ID_USER constant which is defined to 3. Can you try that instead?
I see in your code that you use LOOPER_ID=1. But most code I find (like here) instead use the LOOPER_ID_USER constant which is defined to 3. Can you try that instead?
Ville, AFAIR looper id is not so important and can be any number for your application. Of course, different callbacks should have different ids. In fact, android_native_app_glue.h defines LOOPER_ID_MAIN=1, LOOPER_ID_INPUT=2, and LOOPER_ID_USER=3, but these are just helping constants, not mandatory. This is maybe the reason why some examples use 3 for user-defined loopers.
Anyway, I tried also 3 in ZGESensor but did not help.
Anyway, I tried also 3 in ZGESensor but did not help.