Android的OpenGL ES的不光栅化 - 矩阵乘法交换 [英] Android OpenGL ES not rasterizing - Matrix multiplication switched

查看:347
本文介绍了Android的OpenGL ES的不光栅化 - 矩阵乘法交换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚买了一个新的SGS3(I9300 - 不会LTE ),并希望继续与制定的OpenGL ES(2)应用程序。 不幸的是,当我编译它,我看不到任何东西。

I just bought a new SGS3 (I9300 - NOT LTE) and hoped to continue with developing an OpenGL ES (2) application. Unfortunately when I compile it I don't see anything.

我得到以下LogCat中的错误信息:

I get the following LogCat error messages:

D/libEGL(6890): loaded /system/lib/egl/libEGL_mali.so
D/libEGL(6890): loaded /system/lib/egl/libGLESv1_CM_mali.so
D/libEGL(6890): loaded /system/lib/egl/libGLESv2_mali.so
E/(6890): Device driver API match
E/(6890): Device driver API version: 23
E/(6890): User space API version: 23 
E/(6890): mali: REVISION=Linux-r3p2-01rel3 BUILD_DATE=Wed Oct  9 21:05:57 KST 2013** 
D/OpenGLRenderer(6890): Enabling debug mode 0

我也安装了定制ROM(CyanogenMod的11 - 快照M4),但我得到了同样的问题。

I also installed a custom rom (cyanogenmod 11 - snapshot M4) but I get the same problem.

当我启动应用程序,我得到的空白屏幕没有任何栅格化的顶点。在清晰的彩色作品到目前为止OpenGL的基本功能是否正常。

When I start the app, I get the blank screen without any vertices rasterized. The clear color works so far so the basic functionality of OpenGL is working.

要确保我试着用基本由谷歌开发者页面教程,GLES 1和GLES 2.两个不工作!以下是截图:

To be sure I tried it with the basic tutorial from the Google Developers page with GLES 1 and GLES 2. Both don't work! Here are the screenshots:

http://developer.android.com/training/graphics/opengl/ index.html的

该项目本身工作正常,在我的旧的银河S1 的(也CyanogenMod的),但不显示任何东西比我SGS3空白屏幕。

The project itself works fine on my old Galaxy S1 (also on Cyanogenmod) but does not show anything else than a blank screen on my SGS3.

是否有可能使的的Mali-400 MP4 的显卡驱动程序/系统间preT GL命令的不同?有没有比打电话与我SGS1中的蜂鸟的GPU不同的方式?

Is it possible that the Mali-400 MP4 graphics driver / system interpret GL commands differently? Is there a different way of calling than with the Hummingbird GPU from my SGS1?

有没有人一个想法是什么做的?这是我的电话或者Eclipse的问题吗?或者,这是正常的 - 只是我缺乏了解?我该如何解决这个问题呢?

Has anyone an idea what to do? Is this a problem with my phone or eclipse? Or is this normal - just my lack of understanding? How can I fix this problem?

-------编辑:溶液中发现-------

好吧,我发现了错误。在谷歌文档显示一个错误的矩阵中的顶点着色器乘法:

Okay, I found the error. The google document shows a "wrong" the multiplication of the matrices in the vertex shader:

uniform mat4 uMVPMatrix;
attribute vec4 vPosition;
void main() {
   gl_Position = uMVPMatrix * vPosition;
}

似乎这不是对我的老银河S1一个问题,但不知何故S3(或马里GPU)是挑剔这一点。我改变了乘法的顺序是:

This doesn't seem to be a problem for my old Galaxy S1 but somehow the S3 (or the Mali GPU) is picky about this. I changed the order of multiplication to this:

uniform mat4 uMVPMatrix;
attribute vec4 vPosition;
void main() {
   gl_Position = vPosition * uMVPMatrix;
}

和它的工作原理(也对S1)。不过不知道为什么S1正常工作与两个版本,但是这解决了问题。

And it works (also on the S1). Still not sure why the S1 works fine with both versions but this solves the problem.

感谢您的帮助!

推荐答案

只是把我的头顶部,你检查的投影设置?这是可能的形状都被吸收,就不是你期望的那样。

Just off the top of my head, did you check the projection settings? It's possible those shapes are being drawn, just not where you expect them to be.

另外,检查返回值,着色器加载步骤。如果有一个编译问题,你会得到一个无效的句柄着色器程序。

Also, check the return values for the shader loading steps. If there's a compile issue, you'll get an invalid handle for the shader program.

这篇关于Android的OpenGL ES的不光栅化 - 矩阵乘法交换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆