Android opengl es 和白色纹理
我正在 Android 上使用 OpenGL ES 编写一个简单的 2D 游戏。问题在于,某些纹理仅渲染白色条,而不是实际图像。
加载纹理和绑定纹理期间都没有错误。所有纹理的大小都是 2 的幂。
我正在使用扩展 glDrawTexfOES
来绘制纹理。 我怀疑 GPU 内存可能已用完,但如何检查呢?还有其他想法吗?
I'm writing a simple 2D game on Android using OpenGL ES. The problem is that, instead of actual image for some textures only white bar is rendered.
There was neither error during loading textures nor during binding them. All the textures have power of 2 size.
I'm using extension glDrawTexfOES
to draw textures.
I suspect that I might be running out of GPU memory, but how do I check that? Any other ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该通过两种方式增强代码:
类似的 Android 调用是
在众多其他答案中,有一个指出只需设置 2D 投影的所有内容并绘制一个四边形。
You should enhance the code in two ways:
The analogous Android call is
Amongst loads of other answers, there is one stating to just setup everything for 2D projection and draw a quad.