The source for libGLESv1_CM.so is under frameworks/base/opengl/libs/
GLES_CM. The gl.cpp is the one implements the linking to the driver.
All methods are located in
gl_api.in file, which is included in
gl.cpp. If you want to add tracing code, that's the place to put it,
before the calls to the driver functions.
On Jul 21, 3:15 pm, stasgu <
sta...@gmail.com> wrote:
> So I wrote a script that addstracelog to all jni GL files:
>
> * android_opengl_GLES10.cpp
> * android_opengl_GLES10Ext.cpp
> * android_opengl_GLES11.cpp
> * android_opengl_GLES11Ext.cpp
> * com_google_android_gles_jni_EGLImpl.cpp
> * com_google_android_gles_jni_GLImpl.cpp
>
> It works fine, and I get a log of all gl and egl calls that go thought
> those jni calls.
> The problem is that some applications are "getting smart" (I think
> google earth is like that, and I know that the gl2jni test is like
> that) so they define their own jni call that calls the native gl
> functions.
> For example:
> They define a jni function called draw_frame, and call it from the
> java activity. This draw_frame calls the native gl functions.
>
> This method, used probably for performance, obsoletes the jnitraceof
> all gl methods.
> So I guess the next thing is to actually write a gltrace like library,
> that will replace the libGL.so with the tracing one.
>
> On Jul 19, 4:35 pm, stasgu <
sta...@gmail.com> wrote:
>
> > Hi,
>
> > I want to be able totracegl calls on Android. Something like
> > glTrace, which basically intercepts and logsopenglcalls, on any
> > application, transparent to the application (no code changed). I've
> > googled around, and haven't find anything.
> > So I tried another approach, generated a <app>.tracefile in the
> > eclipse IDE (used for traceview) , to get atraceof all function
> > calls and extracted gles_jni calls from there. That is great, the
> > problem is that it works only on applications that I have source for,
> > and not on any application. So suggestions on any of those options is
> > very welcomed:
>
> > 1. Is there a way to generatetracefiles for any android java