When I try to set projection matrix in GLSurfaceview.onDrawFrame, but
seems it does not work fine. The parameters of glOrthof does not
change size and shape of graphics elements, graph becomes very small.

Part of code as below, does anybody know the reason?

// Display something in second viewport at top-right of screen with
different projection mode
gl.glViewport(mWidth*3/4, mHeight*3/4, mWidth/4, mHeight/4);
gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glPushMatrix() ;
gl.glLoadIdentity();
gl.glOrthof(-mWidth/mHeight/3, mWidth/mHeight/3, -1/3f, 1/3f, 0.8f,
2);
// gl draws something here
gl.glPopMatrix() ;

--~--~---------~--~----~------------~-------~--~----~
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