I have no idea how it differs from the original version (as shipped in the SDK). :-)
The original version just didn't work and i ported a C-version (google it) into Java. And this seems to work for my app and other developers' apps. On Feb 5, 11:22 pm, Tim Newsham <[email protected]> wrote: > Could you explain how your version might differ from the original > version? > The version in the standard library: > > computes M = (Projection x Model)^-1 > puts world into a homogenous vector V, > with x/y coordinates mapped from screen coords to -1.0 to 1.0 > and z coordinate mapped from (0,1) to (-1,1) > w coordinate set t 1 > multiplies MxV, with the resulting w coordinate normalized to 1.0 > returns that value > > I implemented my own version (based on the C GLU library code) and > got substantially the same results (differences less than 1/100th % > off) > > On Feb 5, 5:40 pm, Streets Of Boston <[email protected]> wrote: > > > > > I found issues with the gluUnProject as well. > > I wrote a new one for my own app (The Gube) and it works very well. I > > use gluUnproject for tracking 2D finger-touches and flings into the 3D > > model-view/space. > > > You can do a gluUnproject search on this forum and you will find > > this:http://groups.google.com/group/android-developers/browse_frm/thread/9... > > > Go to message# 8, which contiains the source control. > > > On Feb 5, 7:18 pm, Tim Newsham <[email protected]> wrote: > > > > Hi, I'm having problems with gluUnProject. I saw other discussions on > > > this message base regarding this function and they did not solve my > > > problem. When I use GLU.gluUnProject I get values that are close, but > > > not quite right. I'm manually keeping track of my model matrix and I > > > replicate the projection matrix manually. (I have also tried setting > > > the projection matrix to identity and manually incorporating a > > > projection matrix into my model matrix, and I ended up with the same > > > results). I tried using the builtin GLU.gluUnProject function and I > > > also implemented my own based on reading that source and reading the C > > > GLU sources and both seemed to give substantially similar results. > > > > So I put together a small demo, trying to keep it as minimal as > > > possible and still get the point across. Either this demo shows a > > > misunderstanding I have of gluUnProject or it shows a bug in the > > > function or opengl projections. Can someone check this over and see if > > > I'm just doing something wrong or if there's a bug that needs to be > > > filed? > > > > The files are here:http://www.thenewsh.com/~newsham/unproj/ > > > In particular: > > > > unproj.java - full source to example > > > unproj-debug.apk - resulting apk file > > > unproj - directory with full ant-buildable project > > > unproj.zip - zip of directory > > > > Tim- Hide quoted text - > > - Show quoted text - -- 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

