previous:

[工作记录] Android OpenGL ES 2.0: square texture not supported on some device

recently I found that it is the mipmap of a non-square texture thatcause theblack texture problem:

http://stackoverflow.com/questions/5052762/using-mipmaps-results-in-garbage-textures

the texture resource data(on disk) already have mipmap chains generated,

but some textures don't have full mipmap chain down to 1x1. i.e. some only have 4/3 levels by configuration.

i.e. some scalable UI texture only have top 4 or 3 levels on purpose.

and also, we stop update mipmap on nx1 or 1xn at runtime.

this is okay on most graphics devices(PC DX9/XBOX/PS3 etc.)

but the major problem is that OpenGL ES 2.0 standard lacks of definition of behavior on non-square texture mipmaps(implemention defined behavior). so the GPU/drivers are free to do what they want,

for this case, they just consider a texture "in-complete" if it does not have full mipmap chain(down to 1x1). So to the shader, it is just like an empty sampler bound to no textures. that's the reasonof black textures.

Based on test results, this problem never happens on GLES3.0 API/devices, but happens on some GLES2.0 devices, and some devices with GLES3.0 capable hardware with 2.0 system runtime API.

更多相关文章

  1. 深入Activity
  2. Android(安卓)Accessibility 辅助功能简单介绍
  3. Android自学笔记(番外篇):全面搭建Linux环境(一)——前期准备工作
  4. 关于用百度地图开发的准备工作
  5. Android中的进程(Process)和线程(Thread)
  6. IOS 5编程 -2 -准备工作。
  7. Android中invalidate()和postInvalidate() 的区别
  8. Android开发艺术探索笔记 第四章 View的工作原理
  9. 浅析Android——Android(安卓)8.0(O)后台服务的限制和变化

随机推荐

  1. 猎头职位【互联网热招岗位整理—Android
  2. android AIDL服务
  3. Android(安卓)应用程序窗体显示状态操作(r
  4. Android与JS之间的互相调用交互(一)
  5. 64位ubuntu11.10使用git下载android源码
  6. android amr编解码
  7. [Android(安卓)调试/测试] Android(安卓)
  8. Android入门篇六:使用意图传递数据之返回
  9. android修炼大法
  10. Android异步处理系列文章索引