This is not the OpenGL way of doing things. You are not supposed to "calculate x-units and y-unints depending on window". You are supposed to do all your calculations in "world coordinates" or "user coordinates" (there actually is a slight difference, but they are often treated as interchangeable) and let the -system- transform to window coordinates and ultimately to device coordinates. That is what all the OpenGL commands for pushing/popping/setting matrices are for: the matrices represent the current transformation, the commands are for keeping the current transformation up to date for what you are doing.
For further online sources explaining this, you may want to start with http://www.glprogramming.com/red/index.html. But http://www.opengl.org/code/category/C22 and http://www.droidnova.com/android-3d-game-tutorial-part-i,312.html may also prove very helpful. The latter gives an explanation of the basic OpenGL terminology, the former is a (somewhat out of date) list of tutorials. On Feb 28, 12:53 pm, madhusudhan reddy <[email protected]> wrote: > Hi , > > I am new to android .Recently we started some game application on Open > GL.But problem is while drawing any thing it will be based on > Coordinate system.How can we calculate x-units and y-units depends > upon window .Again when we change landscape to portrait, it is > affecting to > my code at drawing positions.Finally how to control coordinate > system values and all if Any body knows please suggest me if any links > available or code. > > Thanks & Regards, > Madhusudhan D -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

