I’m converting screen coordinates to world coordinates in opengl es 2.0 using
GLU.gluUnProject(winX, winY, winZ, model, modelOffset, project, projectOffset, view, viewOffset, obj, objOffset)
However, I’m unsure on how to retrieve the model view and project matrices. All the examples I’ve found only apply to opengl es 1.0 and 1.1. Any help would be much appreciated. Thank you.
Of course this is possible in OpenGL ES 2.0. The only difference is that you don’t have to pull the matrices using glGetFloatv(GL_MODELVIEW_MATRIX, array), but you have the matrices calculated in your code because OpenGL ES 2.0 no longer has functions such as glRotatef() glTranslate() etc. That’s why you use Android class called Matrix which can do these calculations for you. It’s very simple to pass your matrices to gluUnProject() then.
See how to do Object detection in opengl Android?.