[plt-scheme] opengl binding
Got it working with glVertex2f, however I'd rather have it working like:
(define point (make-vector (<calculate x>) (<calulate y>) ))
(glVertex2fv point)
instead of having to do
(define point (make-vector (<calculate x>) (<calulate y>) ))
(glVertex2f (vector-ref point 0) (vector-ref point 1))
My own opengl binding takes care of this implicitly. It even
accepts lists of numbers there.
BTW. I needed to include opengl-enum.scm from my own
binding to get the right enumerations.
I personally like
gl-projection-matrix
better then
GL_PROJECTION_MATRIX
Would it be an option to adopt the constants from opengl-enum.scm?
Best whishes,
Hans
Scott Owens schreef:
> The sgl collection relies only on the foreign-function interface (as
> of v299.28), and can be used with either mred/DrScheme or mzscheme.
> sgl only provides access to the functions documented in the GL (1.5)
> and GLU specs, and not to the functions of glx, or whatever OS X or
> MS Windows use to manage GL drawing contexts. mred provides this
> functionality, but sgl itself is agnostic about how the GL contexts
> are managed (as is the OpenGL spec itself).
>
> -Scott
>
> On Sep 18, 2005, at 12:39 PM, Hans Oesterholt wrote:
>
>> Scott Owens schreef:
>>
>>
>>> I'm curious if you are unaware of the GL binding that comes with
>>> PLT Scheme, or if you found it deficient.
>>>
>>> -Scott
>>>
>>
>> I didn't try it yet. It is part of drscheme, not mzscheme isn't it?
>> Can I install it seperately from drscheme? I'll give it
>> a try sometime soon. It's not that I don't want to use it.
>> Some months ago, when I created mzopengl, wasn'tt aware
>> of the existence of sgl. As I am about to release the first
>> alpha of mzgtk2, I needan opengl binding working
>> with mzgtk2 released.
>>
>> Hans
>>
>>
>