I'm trying to convert window coordinates to object coordinates. There's a gluUnProject in GLU class, which requires current modelview, projection matrices and viewport.
My question is how to get those matrices? I tried gl.glGetIntegerv (GL11.GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES, model, 0); and ((GL11) gl).glGetFloatv(GL11.GL_MODELVIEW_MATRIX, modelf, 0); but the first one returns an array of zeros, and the other one just shows an "method not implemented" error.
Is gluUnProject the correct method for this purpose (i.e. window coordinates --> object coordinates) ?
The basics. Android supports OpenGL both through its framework API and the Native Development Kit (NDK).
OpenGL in Android is a graphics library that is used for 2D and 3D graphics development in Android applications. OpenGL provides cross-platform APIs. It processes high-performance data transfer between CPU and GPU. OpenGL supports the android native development kit(NDK) for graphics features development.
you cannot get the matrix, since Android provides GLES 1.0, and not GLES 1.1 at this point, and therefor doesn't support all the various glGet* functions of 1.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With