[racket] SGL Bindings

From: Stephan Houben (stephanh42 at gmail.com)
Date: Tue Jun 18 07:36:58 EDT 2013

Hi Sean,

Note that opengl only wraps GL.
unproject (gluUnproject in C) is part of the GLU library.

It seems you are mixing sgl and opengl calls.
While that is supposed to work, you have to realize that they wrap the C
arrays in different ways.

Note that GLU is deprecated because it doesn't make any sense with the new
(shader-based) OpenGL pipeline.
You are nowadays supposed to do your own matrix wrangling in client code,
in Racket this would probably mean using the math library.

Depreciation means it might get removed from OpenGL implementations
somewhere in the very far future. I wouldn't worry too much about it.


2013/6/18 Jay McCarthy <jay.mccarthy at gmail.com>

> 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.
> On Monday, June 17, 2013, Sean Kanaley wrote:
>> Hello all,
>> 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...
>> Does anybody know how to use unproject?
>> ____________________
>>  Racket Users list:
>>  http://lists.racket-lang.org/**users<http://lists.racket-lang.org/users>
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://faculty.cs.byu.edu/~jay
> "The glory of God is Intelligence" - D&C 93
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130618/d77957cd/attachment.html>

Posted on the users mailing list.