简体   繁体   English

适用于Android的OpenGL ES2-奇怪的随机突起

[英]OpenGL ES2 for Android - Weird random juts

I'm just starting to learn OpenGL ES2 for Android, and have come across a weird problem where sometimes a weird jut will be rendered from my objects (see pic). 我刚刚开始学习适用于Android的OpenGL ES2,并且遇到了一个奇怪的问题,有时会从我的对象中渲染出一个奇怪的凸起(参见图片)。 This doesn't always happen, which is strange, so I'm wondering if anyone has any experience with this sort of thing and how to fix it. 这并不总是会发生,这很奇怪,所以我想知道是否有人对这种事情有什么经验,以及如何解决。

http://img717.imageshack.us/i/device2h.png/ http://img717.imageshack.us/i/device2h.png/

The problem here was that I was calling GLES20.glDrawArrays(type, first, count) with an incorrect count. 这里的问题是我在调用GLES20.glDrawArrays(type,first,count)时计数不正确。 Setting the variable correctly fixed it. 正确设置变量将其固定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM