That's correct. The EGL_NV_system_time extension is not guaranteed to be present on all devices. The proper way to use an extension like this is to first query that the extension is present on the device your app is running on via eglQueryString(dpy, EGL_EXTENSIONS) and some string parsing. If it is present, then you can query the function pointer by calling eglGetProcAddress("eglGetSystemTimeNV") and casting the result to the function typedef that's defined in eglext.h. For example:
PFNEGLGETSYSTEMTIMENVPROC eglGetSystemTimeNV;
eglGetSystemTimeNV = (PFNEGLGETSYSTEMTIMENVPROC) eglGetProcAddress("eglGetSystemTimeNV");
In general, you shouldn't need to define EGL_EGLEXT_PROTOTYPES, which is why it's not defined by default.
I would also suggest that you try using the more portable clock_gettime call (probably with CLOCK_MONOTONIC) rather than using EGL to get the time. You can call that directly without any of this extension querying stuff.
On Tuesday, January 8, 2013 12:14:06 PM UTC-8, Turk wrote:
I guess that, with the NV suffix, that this function is only available on NVidia GPUs.
On Nov 2, 2012, at 6:41 PM, 0Camus0 wrote:
> Hi,
>
> I'm trying to use eglGetSystemTimeNV function, it's defined on the eglext.h under EGL_EGLEXT_PROTOTYPES.
>
> If I define EGL_EGLEXT_PROTOTYPES, it compiles but I get undefined reference to eglGetSystemTimeNV, -lEGL.so is linked, I can call other egl functions. After checking the .so there is NO reference at all, not in the platform 9 nor in the 14.
>
> There is almost no info about this.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/android-ndk/-/DDIfnvTZepQJ.
To post to this group, send email to
[hidden email].
To unsubscribe from this group, send email to
[hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.