opengl android api,Tracer for OpenGL ES

Tracer is a tool for analyzing OpenGL for Embedded Systems (ES) code in your Android application.

The tool allows you to capture OpenGL ES commands and frame by frame images to help you understand

how your graphics commands are being executed.

Note: The Tracer tool requires a device running Android 4.1 (API

Level 16) or higher.

Running Tracer

Tracer can be run as part of the Eclipse Android Development Tools (ADT) plugin or as part of the

Device Monitor tool.

To run Tracer in Eclipse:

Start Eclipse and open a workspace that contains an Android project.

Activate the perspective for Tracer by choosing Window > Open Perspective >

Other...

Select Tracer for OpenGL ES and click OK.

To run Tracer in Device Monitor:

Start the Device Monitor tool.

Activate the perspective for Tracer by choosing Window > Open

Perspective...

Select Tracer for OpenGL ES and click OK.

Generating a Trace

Tracer captures OpenGL ES command execution logs and can also capture progressive images of the

frames generated by those commands to enable you to perform logical and visual analysis of your

OpenGL ES code. The Tracer tool operates by connecting to a device running Android 4.1 (API Level

16) or higher that is running the application you want to analyze. The Tracer tool captures trace

information while the application is running and saves it to a .gltrace file for

analysis.

dialog-trace.png

Figure 1. Trace capture dialog box.

To capture an OpenGL ES trace for an Android application:

Connect the Android device using a USB cable and make sure it is enabled for debugging. For

more information, see 使用硬件设备.

In Eclipse or Device Monitor, activate the Tracer for OpenGL ES

perspective.

On the toolbar, click the trace capture button (

icon-capture.png).

In the dialog box, select the Device to use for the trace.

In the Application Package field, enter the full application package name

containing the activity you want to trace, for example: com.example.android.opengl

In the Activity to launch field, enter the class name of the activity you

want to trace, for example: OpenGLES20Complete

Note: If you are tracing the default activity for the

application, you can leave this field blank.

Select the desired Data Collection Options.

Note: If you want to capture progressive frame images for each

drawing call, enable the Read back currently bound framebuffer on glDraw*() option.

Be aware that using this option can result in large trace files.

Enter a Destination File for the trace output.

Click Trace to start the trace capture.

On the connected device, exercise the functions of your application you want to trace.

In the dialog box, Stop Tracing to complete the tracing run.

Analyzing a Trace

After you have generated a trace, you can load it for review and analysis.

To review a captured trace:

In Eclipse or Device Monitor, activate the Tracer for OpenGL ES

perspective.

On the toolbar, click the trace load button (

icon-load-trace.png).

After loading a trace, select a frame and review the OpenGL ES calls. Drawing commands are

highlighted in blue.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值