Thomas, I just tested this using the glGetIntegerv method that
takes an int array instead of a Buffer.  It also returned 0 for me.
So I dug into the source and found that the implementation of
glGetIntegerv doesn't have a case for GL_MATRIX_MODE.  And it sets the
GL error to GL_INVALID_ENUM (1280).  And sure enough, 1280 is returned
by a call to glGetError right after the call to glGetIntegerv.  So it
looks like you can't get the GL_MATRIX_MODE that way on Android.

    And upon further looking through the code I don't see anywhere
that the matrixMode state variable is accessed.  So I doubt that
you'll have any luck getting it from the java API.

    If you control all of your OpenGL code you can work around this by
using a wrapper to change GL state.  It's not ideal, but it should
work.  That wrapper class could then be queried for the current matrix
mode.

    -Anton

On Mar 23, 7:39 am, tcassany <tcass...@betomorrow.com> wrote:
> Hello,
>
> I just would to know how can I get the currentmatrixmode. I try whit
> this :
>
> ByteBuffer buffer = ByteBuffer.allocate(4);
> buffer.order(ByteOrder.nativeOrder());
> IntBuffer matrixMode = buffer.asIntBuffer();
> gl.glGetIntegerv(GL11.GL_MATRIX_MODE, matrixMode);
>
> ......
>
> gl.glMatrixMode(matrixMode.get(0))
>
> But it's alway return 0 instead of GL_MODELVIEW(5888) in my case.
>
> Thanks,
>
> Thomas
--~--~---------~--~----~------------~-------~--~----~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to