how to use gluUnProject

by Gameboy » Mon, 07 Sep 2009 23:19:37 GMT

Sponsored Links
 I'm trying to use gluUnProject for checking touch selection on a 3D
object, but seems I can not do with current 1.5 emulator.

The method needs to know current viewport, model view matrix and
project matrix, I'm trying to use G11 gl to query but get nothing with
below codes:

int[] viewport = new int[4] ;
gl.glGetIntegerv(GL11.GL_VIEWPORT, viewport, 0) ;
float[] modelview = new float[16] ;
gl.glGetFloatv(gl.GL_MODELVIEW_MATRIX, modelview, 0) ;
float[] project = new float[16] ;
gl.glGetFloatv(gl.GL_PROJECTION_MATRIX, project, 0) ;

1) Is there other way to get these params?
2) Does current 1.5 emulator support these G11 feature?

how to use gluUnProject

by Streets Of Boston » Tue, 08 Sep 2009 21:54:50 GMT

 Look for and in the 'API
Demoes' that comes with the Android SDK.


Sponsored Links

how to use gluUnProject

by androidDeveloper » Mon, 21 Sep 2009 19:11:08 GMT

 Have you checked the MatrixGrabber?

I tried to use the MatrixGrabber, but I got an class Cast Exception in
the MatrixGrabber Row 56:
    private void getMatrix(GL10 gl, int mode, float[] mat) {
        MatrixTrackingGL gl2 = (MatrixTrackingGL) gl;

Does anyone know how to use it?


how to use gluUnProject

by Streets Of Boston » Mon, 21 Sep 2009 20:59:02 GMT

 Be sure that the 'gl' you use in your app is actually a
MatrixTrackingGL, a wrapper around the GL10 instance returned by the
opengl api.

Look at the API Demoes source code that comes with the Android SDK.
Look at the '' class.

On Sep 21, 7:09am, androidDeveloper <>


how to use gluUnProject

by androidDeveloper » Mon, 21 Sep 2009 22:10:50 GMT

 Thanks. I found the error. The Code example is found in the ApiDemos
"" SpriteTextActivity.


how to use gluUnProject

by Robert Green » Tue, 22 Sep 2009 05:14:31 GMT

 If you want to pick a rendered object, just check for collisions with
a primitive bounding box and a casted ray.

1)  Keep a copy of the matrix you use for the projection.
2)  Implement this, using that matrix that you kept.

For iPhone but easily portable to Android, so long as you know that
you can't get the projection matrix normally. 


Other Threads

1. How can i run monkey on pre-defined activities

         I need to test some sequence of activities of my application.
so i selected
monkey tool which generate the random hits and touch on an selected package.
Please help to do monkey testing on an pre-defined activities.

Thanks in Advance
-- Madhu


2. No space left on device

    I develop meet this problem ,there is No space left on device.How do we
handle this error.



3. How to PORTING Android to Dopod or other mobile phone

4. Sync Microsoft Outlook Email!

5. Send Http Request

6. about Android filesysm Architecture.

7. Is there a command in the API to turn the keyboard backlight off?