Textures not rendering in 2.3.3

为君一笑 提交于 2019-12-20 05:40:41

问题


I ran into somewhat of a stressful issue today while wokring on my game for android and was hoping someone would have some insight. My friend has used cyanogenmod on his Droid incredible to root and install gingerbread 2.3.3. I tried booting up the game on his device and it seems to be running but everything is white. Being as my glClear is black, I'm assuming that this means the bitmaps and/or textures are not loading correctly. I've tried putting my textures in all of the different dpi folders, tried setting the max API level to 8 for froyo, tried setting the platform for the project in the sdk to 2.3.3 but nothing I do seems to affect it in any way.

I'm perfectly capable of accepting that the fact that he's using an unofficial firmware for his phone disqualifies this from any indepth search but do you guys think it's really to do with the firmware? Or is there something else I can try to get it to work.


回答1:


(Moved from comments to an answer)

It may absolutely be the texture size. The GPU in each device is different and will support different extensions of OpenGL. Try with a height and width that are limited to 64, 128, 256, 512 or 1024 and I'll bet it will work. My Samsung Captivate couldn't run one of the sample apps because it was a 192 x 192 image. Once I modified it to use a 256 X 256 texture, it worked.

Now I'm re-reading and it sounds like you guys have the same hardware... however it's still possible that the firmware messed up the OpenGL extensions (maybe...) so definitely give the more standard sizes a shot.



来源:https://stackoverflow.com/questions/5738580/textures-not-rendering-in-2-3-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!