Android的GLES20工程仿生4.1.2但不是三星4.4.2 [英] Android GLES20 works on bionic 4.1.2 but not on Samsung 4.4.2

查看:266
本文介绍了Android的GLES20工程仿生4.1.2但不是三星4.4.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我工作的一个应用程序在Android设备上使用OpenGL ES 2.0。该应用程序包含了使用编程布局控件显示的一些按钮。此按钮垫叠加在OpenGL的表面观。当我运行在平板电脑上应用程序的按钮出现,但在表面观是灰色的,背景为我创建3D模型的颜色。这使我相信有什么毛病我的着色器。我使用许多均匀VEC2在我的片段着色器。我在看这个网站:

http://www.shaderific.com/glsl-variables/

和它说,有一个内置的功能,可以用它来告诉多少均匀载体您的GL采用的实现。如何在Android上运行该code?

  gl_MaxFragmentUniformVectors

我打印出来GLES20.GL_MAX_FRAGMENT_UNIFORM_VECTORS的内容,我得到36349.我着色器使用约20个的数量。

如果这不会导致任何东西,这是基本的错误。该应用程序适用于摩托罗拉仿生的Andr​​oid 4.1.2,但在三星Galaxy Tab版/专业版,是Android 4.4.2不行!当然,我想它在两个工作。

  W / ApplicationPackageManager:getCSCPackageItemText()
E / MoreInfoHPW_ViewGroup:家长的观点是不是一个TextView

下面

是一个日志为三星设备。

  10-10 14:27:03.723 30456-30462 / org.android.airplane D / dalvikvm:调试器分离;对象注册了1项
10-10 14:38:55.833 1269年至1269年/ org.android.airplane I / SELinux的:功能:selinux_android_load_priority [0],没有sepolicy文件。
10-10 14:38:55.833 1269年至1269年/ org.android.airplane I / SELinux的:功能:selinux_android_load_priority,加载的版本是VE = SEPF_SM,T320_4.4.2_0018
10-10 14:38:55.833 1269年至1269年/ org.android.airplane I / SELinux的:selinux_android_seapp_context_reload:seapp_contexts文件从/ seapp_contexts装
10-10 14:38:55.843 1269年至1269年/ org.android.airplane D / dalvikvm:晚启用CheckJNI
10-10 14:38:55.943 1269年至1269年/ org.android.airplane W / ApplicationPackageManager:getCSCPackageItemText()
10-10 14:38:55.983 1269年至1269年/ org.android.airplane E / MoreInfoHPW_ViewGroup:家长的观点是不是一个TextView
10-10 14:38:56.083 1269年至1269年/ org.android.airplane I /肾上腺EGL:其中,qeglDrvAPI_eglInitialize:410计算值:1.4 EGL构建高通公司()
    OpenGL ES的着色器编译器版本:E031.24.00.07
    生成日期:14年1月22日星期三
    当地分公司:base_au149_adreno_au169_patches
    远程分支:
    本地补丁:
    重构分公司:
10-10 14:38:56.113 1269年至1269年/ org.android.airplane D / OpenGLRenderer:启用调试模式0
10-10 14:38:58.823 1269年至1269年/ org.android.airplane W / ApplicationPackageManager:getCSCPackageItemText()


解决方案

这是更新解决了这个问题。我的三星设备的工作原理吧!

I have an app that I'm working on that uses openGL ES 2.0 on an android device. The app contains some buttons that are displayed using programmatic layout controls. This button pad is superimposed on a OpenGl Surface View. When I run the app on the tablet the buttons appear but the Surface View is grey, the color of the background for the 3d model I've created. This leads me to believe there's something wrong with my shaders. I use many uniform vec2's in my fragment shader. I'm looking at this web site:

http://www.shaderific.com/glsl-variables/

and it says there's a built in function that you can use to tell how many uniform vectors your implementations of GL uses. How do I run this code in android?

gl_MaxFragmentUniformVectors 

I print out the contents of GLES20.GL_MAX_FRAGMENT_UNIFORM_VECTORS and I get the number 36349. My shader uses about 20.

If that doesn't lead to anything, this is the basic error. The app works on a Motorola Bionic, Android 4.1.2, but doesn't work on a Samsung Galaxy Tab/Pro, Android 4.4.2! Of course I would like it to work on both.

W/ApplicationPackageManager﹕ getCSCPackageItemText()
E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView

below is a log for the Samsung device.

10-10 14:27:03.723  30456-30462/org.android.airplane D/dalvikvm﹕ Debugger has detached; object registry had 1 entries
10-10 14:38:55.833    1269-1269/org.android.airplane I/SELinux﹕ Function: selinux_android_load_priority [0], There is no sepolicy file.
10-10 14:38:55.833    1269-1269/org.android.airplane I/SELinux﹕ Function: selinux_android_load_priority , loading version is VE=SEPF_SM-T320_4.4.2_0018
10-10 14:38:55.833    1269-1269/org.android.airplane I/SELinux﹕ selinux_android_seapp_context_reload: seapp_contexts file is loaded from /seapp_contexts
10-10 14:38:55.843    1269-1269/org.android.airplane D/dalvikvm﹕ Late-enabling CheckJNI
10-10 14:38:55.943    1269-1269/org.android.airplane W/ApplicationPackageManager﹕ getCSCPackageItemText()
10-10 14:38:55.983    1269-1269/org.android.airplane E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView
10-10 14:38:56.083    1269-1269/org.android.airplane I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build:  ()
    OpenGL ES Shader Compiler Version: E031.24.00.07
    Build Date: 01/22/14 Wed
    Local Branch: base_au149_adreno_au169_patches
    Remote Branch:
    Local Patches:
    Reconstruct Branch:
10-10 14:38:56.113    1269-1269/org.android.airplane D/OpenGLRenderer﹕ Enabling debug mode 0
10-10 14:38:58.823    1269-1269/org.android.airplane W/ApplicationPackageManager﹕ getCSCPackageItemText()

解决方案

An update solved the problem. My Samsung device works now!

这篇关于Android的GLES20工程仿生4.1.2但不是三星4.4.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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