关于三星Galaxy ACE GT-S5830 ETC1纹理支持 [英] ETC1 texture support on Samsung Galaxy ACE GT-S5830

查看:332
本文介绍了关于三星Galaxy ACE GT-S5830 ETC1纹理支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个三星Galaxy ACE GT-S5830 Android手机。
其具有的Adreno-200的GPU。

I have this Samsung Galaxy ACE GT-S5830 android phone. which has an Adreno-200 GPU.

我本来期望它有ETC(爱立信的COM pression格式)的支持,
不过貌似不能加载它们。

I would have expected it to have the ETC (Ericsson Compression format) support, but looks like it cannot load them.

虽然gl.glGetString(GL10.GL_EXTENSIONS)函数包含GL_OES_com pressed_ETC1_RGB8_texture扩展。

Although the gl.glGetString(GL10.GL_EXTENSIONS) function contains the GL_OES_compressed_ETC1_RGB8_texture extension.

但android.opengl.ETC1Util.isETC1Supported()返回false?
这太奇怪了。

but the android.opengl.ETC1Util.isETC1Supported() returns false ??? This is so strange.

我已经转换我的文件.pkm格式。
这就是我如何加载纹理,但所有我看到的是白色的屏幕显示纹理不加载。

I have converted my files to .pkm format. This is how i am loading the texture, but all i see is the white-screen indicating the texture is not loaded. :

InputStream is= _context.getAssets().open("etc/hands_tex.pkm");                     
gl.glActiveTexture(GL10.GL_TEXTURE0);   //texture unit to load texture to.
gl.glBindTexture(GL10.GL_TEXTURE_2D, glTextureId);
try {
    ETC1Texture etc1tex = ETC1Util.createTexture(is);               
    ByteBuffer bb = etc1tex.getData();              
    gl.glCompressedTexImage2D(GL10.GL_TEXTURE_2D, level, ETC1.ETC1_RGB8_OES, etc1tex.getWidth(), etc1tex.getHeight(), 0, bb.capacity(), bb);                
} catch (IOException e) {
   e.printStackTrace();
}

尽管上述作品ETC1Util.createTexture()呼叫,并在内存中创建纹理对象。

Even though the call to ETC1Util.createTexture() above works and creates the texture object in memory.

推荐答案

我从来没有用过Java的GL,但我写的OpenGL本土code为Android使用ETC1 COM pression所以希望我可以帮。 ETC1是Android常见的质感COM pression格式,并具有扩展present显示设备支持它。 :)

I've never used Java GL but i've written native OpenGL code for Android that uses ETC1 compression so hopefully i can help. ETC1 is the common texture compression format for Android and having the extension present shows that your device supports it. :)

有一些未知这里,你应该尝试解决。

There are a few unknowns here that you should try and resolve.

这可能是你的纹理加载和显示code出现故障,而不是ETC1一部分。所以,你应该尝试换出ETC1和使用非COM pressed安全的格式,如32位到
检查正确显示。

It might be your texture loading and display code is faulty, not the ETC1 part. So you should probably try swapping out ETC1 and use a non-compressed safe format such as 32bit to check that displays correctly.

然后尝试用一个简单的32×32 ETC1纹理除去具有影响力的非方形NPOT大小。使用硬codeD值的的 glCom pressedTexImage2D 的电话:

Then try using a simple 32x32 ETC1 texture to remove non-square NPOT sizes having a influence. Use hard-coded values for the glCompressedTexImage2D call:

gl.glCompressedTexImage2D(GL10.GL_TEXTURE_2D, level, ETC1.ETC1_RGB8_OES, 32, 32, 0, 512, bb);

确认的 BB 的是有效的,如果过程为NULL是一个有效的参数。
从返回code的 glCom pressedTexImage2D 的也是非常有用的。

Make sure bb is valid if course as NULL is a valid parameter. The return code from glCompressedTexImage2D is also very useful too.

道歉,如果你已经尝试过这一点。
希望有利用它,
刘德华

Apologies if you've already tried this. Hope its of some use, Andy

这篇关于关于三星Galaxy ACE GT-S5830 ETC1纹理支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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