Hi,
I think you're rendering too many elements in your onDrawFrame -method.
buffer.position(0);
gl.glVertexPointer(2, GL10.GL_FLOAT, 0, buffer);
gl.glDrawArrays(GL10.GL_POINTS, 0, counter);
Here counter seems to be number of values within buffer while you should render
only number of vertice elements. Meaning, if I read your source code correctly,
you should render counter/2 points (or line strip vertices).
--
H
On Oct 24, 2012, at 5:03 PM, Karl Geerts <[email protected]> wrote:
> Hello,
>
> I've been looking all over the internet but I cant figure out what I did
> wrong. So I'm trying to graphicly show the audio recording. So it has to be
> realtime. I checked all my points and they are normal. But I get a lot of
> lines (if I use the GL10.GL_LINES) or a lot of static points (when using
> GL10.GL_POINTS). Now I don't know where the lines come from and why they're
> not removed. Anyone that has an idea? Or a great example with a refreshing of
> the vertex array every ondraw method.
>
> I added my renderer class and a screenshot from my phone when testing (made
> with GL_LINES, points is a bit hard to see).
>
> Any help would be great.
> Thanks,
> Karl
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en