get Matrix

Hello,
im trying to get the current modelview matrix.
i tried something like this


 private ByteBuffer tmp = ByteBuffer.allocateDirect(4*16);
 private FloatBuffer store = tmp.asFloatBuffer();
...
glGetFloat(GL_MODELVIEW, store);


but that gives me a enum Error (1280).
Any idea how to solve this?

Hi

Use rather GL_MODELVIEW_MATRIX. Good night. I’m falling asleep…

gouessej is correct, GL_MODELVIEW is used when calling glMatrixMode() and GL_MODELVIEW_MATRIX is used in glGetFloat. It’s the same convention for GL_PROJECTION and GL_TEXTURE (e.g. GL_PROJECTION_MATRIX and GL_TEXTURE_MATRIX).

sigh… thank you guys for helping me. wasted like 3 hours on that problem :slight_smile: