Sunday, June 13, 2010

[android-developers] GLES/IntBuffer/?? Mis-placed verts?

so... I have a simple terrain mesh which, generally speaking, works
fine.

But as I walk around, occasionally, from some camera angles, a
triangle of that mesh is clearly being rendered incorrectly. As if
one of its verts has moved (considerably).

But the vertex IntBuffer has not changed. (nor any of the other
buffers associated with that drawElements call)

I can change my heading and the badness will come and go at the same
point.

If I move a bit or change heading, it will fix itself.

---

So same code, same data, but from some locations and some view
directions, one triangle will be messed up. As if GLES is mis-reading
the vertex buffer (again, whose contents are calculated once and never
changed)

And I will go so far as to say it is never more than one triangle at a
time (though I can't prove that).

I can also fantasize it might be some internal math overflow dealing
with the integer coordinates (I mean the "one = 1<<16" form).

The Index buffer (a ShortBuffer) is also constant. But mis-reading
that could also lead to wackiness.

It's.. weird. But luckily, it's also rare. Just disturbing to see a
hole in the terrain that ought not be there.

- Dan

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment