<div dir="ltr"><div><div><div>Hi Sean,<br><br></div>Note that opengl only wraps GL. <br></div>unproject (gluUnproject in C) is part of the GLU library.<br><br></div><div>It seems you are mixing sgl and opengl calls.<br></div>
<div>While that is supposed to work, you have to realize that they wrap the C arrays in different ways.<br></div><div><br></div><div>Note that GLU is deprecated because it doesn't make any sense with the new programmable<br>
</div><div>(shader-based) OpenGL pipeline.<br></div><div>You are nowadays supposed to do your own matrix wrangling in client code,<br></div><div>in Racket this would probably mean using the math library.<br><br></div><div>
Depreciation means it might get removed from OpenGL implementations<br></div><div>somewhere in the very far future. I wouldn't worry too much about it.<br><br></div><div>Stephan<br></div><div><br><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/6/18 Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com" target="_blank">jay.mccarthy@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don't know about unproject, but I'd recommend using the opengl package. While it doesn't have Rackety wrappers, it is more complete and use raw cvectors on most interfaces so it can be more obvious how to use the calls if you know C. <div class="HOEnZb">
<div class="h5"><span></span><br>
<br>On Monday, June 17, 2013, Sean Kanaley wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello all,<br>
<br>
I'm attempting to do some 3d targeting by screen position, and it would be convenient to use unproject, however I can't figure out the parameters. The OpenGL specs require various matrices to be passed in, and Racket wants them of type gl-double-vector, which seems to be a type synonym for cvector, but then when I get the matrices of that type with glGetFloatv and pass it to unproject it complains it got a cvector instead of a double-vector...<br>
<br>
Does anybody know how to use unproject?<br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/<u></u>users</a><br>
</blockquote><br><br></div></div><span class="HOEnZb"><font color="#888888">-- <br>Jay McCarthy <<a href="mailto:jay@cs.byu.edu" target="_blank">jay@cs.byu.edu</a>><br>Assistant Professor / Brigham Young University<br>
<a href="http://faculty.cs.byu.edu/~jay" target="_blank">http://faculty.cs.byu.edu/~jay</a><br>
<br>"The glory of God is Intelligence" - D&C 93<br>
</font></span><br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>