Thank you for your hints.
I already reposition to 0 in my getBuffer methods similar to this:
public Buffer getBufferVtx() {
m_VtxBuffer.position(0);
return m_VtxBuffer;
}
Also, the buffers do not get recycled between glDrawElements calls.
What did you mean with this :
> Another rough one was that in Android 1.5 putting an array into a
> buffer using a non-zero offset into the array to start from doesn't
> work. Works in later versions of Android, however.
I am not using multiplexed arrays, thus each array starts at index 0
(for color, vertices and texcoords). The data it self is absolutely
fine - I validated this in my PC version.
Is there any way to force that the GL interface on Android has
rendered all data provided during the OnDraw event of the render? How
bad/important are the clientstates (glEnableClientState) on Android?
Can I recycle the ByteBuffers every frame or should I have several
that get swapped each frame - I`ve read somewhere that GlSurfaceView
gets double-buffered - maybe I simply change the bytebuffers in an
OnDraw call where it gets used by a native render call?
On 13 Feb., 07:24, Lance Nanek <[email protected]> wrote:
> I haven't run into anything like that myself. I do often run into
> issues that can cause the data to be incorrectly offset or otherwise
> messed up, however, which might look similar.
>
> The position of the buffer is important when you call glVertexPointer,
> for example. So if the way you filled the buffer changed the position,
> it has to be rewound or otherwise set back to where you want it before
> you call glVertexPointer.
>
> Another rough one was that in Android 1.5 putting an array into a
> buffer using a non-zero offset into the array to start from doesn't
> work. Works in later versions of Android, however.
>
> Another issue is that the way the glVertexPointer call works is that
> it doesn't consume the actual data. It is just setting the pointer to
> the data. So changing the data before your other calls actually cause
> it be used later on would cause trouble.
>
> On Feb 12, 5:02 am, Clankrieger <[email protected]> wrote:
>
>
>
> > Hi,
>
> > I got an issue while rendering a number of meshes on aGlSurfaceView
> > renderer: The meshes are sometimes broken or are not updated on screen
> > during my render call. The whole 1.6 application is running single
> > threaded, rendering is done with vertexpointers like this:
>
> > glVertexPointer(3, GL10.GL_FIXED, 0,
> > (IntBuffer)_pMesh.getBufferVtx());
>
> > It looks a bit like the native interfaced get spammed by my render
> > calls and do not get enough time to natively actually draw the data?
> > It behaves completely the same on emulator and an actual phone. I am
> > using the rendering pipeline on a PC project as well were is works
> > absolutely fine.
>
> > I begun feeling really desperate and dumb because I can't get this
> > working properly since days. :(
>
> > Thank you!
--
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