OpenGL的调试OpenGL

2023-09-07 03:51:57 作者:七友.

当我写的OpenGL(1.0)针对Android的方案,我发现它不容易调试我的程序。 OpenGL是只是一个几个步骤,过程顶点coordintates固定的管道。有什么办法来偷看,看看什么是管线的连续步骤?

When I write OpenGL (1.0) programs for Android, I found it not easy to debug my programs. OpenGL is just a fixed pipeline of several steps which process vertex coordintates. Is there any way to peek and see what are results of consecutive steps of the pipeline?

补充:疯狂的科学家,谢谢你的建议。不过,我试图用示踪的OpenGL ES(从 http://developer.android下面的说明.COM /工具/帮助/ gltracer.html ),我仍然不知道对我怎么找到我需要的信息。我可以看到滑块来选择一个框架,然后我可以看到调用的函数列表。当我选择的功能之一,我可以看到GL状态。但是,当我看到(这里面GL状态)的情况下0 - >顶点数组数据 - >通用顶点属性,所有的坐标我看到的都是零。它是正常的吗?我的主要希望是,在这些情况下,如果我能看到的只是一个黑色的屏幕,我将能够看到之前和矩阵相乘后有哪些顶点'的坐标,这将有助于我找到了为什么他们是不可见的。

Added: Mad Scientist, thanks for your advice. However, I tried to use Tracer for OpenGL ES (following instructions from http://developer.android.com/tools/help/gltracer.html ) and I'm still not sure on how do I find the information I need. I can see slider to choose a frame, then I can see a list of functions called. When I choose one of functions, I can see GL state. But when I look (inside this GL state) at context 0 -> vertex array data -> generic vertex attributes, all coordinates I can see are zeroes. Is it normal? My main hope is that in those situations when I can see nothing but a black screen I would be able to see what are vertexes' coordinates before and after multiplication by matrices and this will help me find out why they are invisible.

推荐答案

使用 OpenGL的示踪为Android ,它是Android SDK的一部分。刚开始的显示器程序和跟踪您的应用程序。

Use the OpenGL Tracer for Android, it is part of the Android SDK. Just start the Monitor program and trace your App.

我发现示踪有点喜怒无常,它不会与我的Nexus 10的工作,但如果它的工作原理提供了大量的信息。

I found the Tracer a bit temperamental and it does not work with my Nexus 10, but if it works it provides a lot of information.