[plt-scheme] sgl meets the OpenGL spec?
On Thursday, October 9, 2003, at 10:33 AM, Ryan Jarvis wrote:
> Now how do I call these functions using the C API?
>
> I tried
> (glGetFloatv 'GL_MODELVIEW MATRIX (vector->gl-float-vector
> (list->vector
> (list))
The symbol approach only works with the sgl.ss module.
> (glGetFloatv GL_MODELVIEW MATRIX (vector->gl-float-vector (list->vector
> (list))
All of the definitions for the GL_ constants come from the gl.ss
module, which is the safe counterpart to gl-unsafe.ss.
Because the call to glGetFloatv is unsafe, make sure the vector you
pass to it has enough room to hold the results that glGetFloatv will
try to put into it or bad things could happen.
-Scott
>
> The first attempt tells me that the first argument needs to be a
> non-negative exact integer where the second attempt, more resembling
> the
> example in your help file, tells me gl_modelview_matrix is an undefined
> identifier.
>
> What am I missing here?
>
> TIA.
>
> -Ryan
>
> On Wed, 8 Oct 2003, Scott A Owens wrote:
>
>> On Wednesday 08 October 2003 02:31 pm, Ryan Jarvis wrote:
>>> For list-related administrative tasks:
>>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>>
>>> Thanks for your prompt reply.
>>>
>>> (require (lib "gl-unsafe.ss" "sgl"))
>>> (glGetFloatv 'GL_MODELVIEW_MATRIX)
>>>
>>> gives me the error
>>>
>>> dynamic-require: name is not provided: gledgeflagpointer by module:
>>> |,C:\PROGA~1\plt\collects\sgl\gl-prims|
>>>
>>> I am not sure what that means but gl-unsafe.ss requires
>>> gl-wrapper-helper.ss. When I look in gl-wrapper-helper.ss it has a
>>> line
>>> at the top that says
>>>
>>> (define path '(lib "gl-prims.ss" "sgl"))
>>>
>>> I did a search and there is no gl-prims.ss anywhere on my computer,
>>> least
>>> of all in the sgl folder. There is a gl-prims.c and
>>> gl-prims-unsafe.c but
>>> that's it.
>>
>> This is indeed spooky, but not the problem. mzscheme looks for a
>> compiled
>> version of gl-prims (.zo or .so) before looking for the .ss version.
>> The
>> compiled version (gl-prims.so) is generated from gl-prims.c.
>>
>> I fixed the problem - gl-unsafe.ss was trying to get its primitives
>> from
>> gl-prims instead of gl-prims-unsafe - and exp tagged it, so if you're
>> using
>> the CVS version you should be fine. Otherwise you'll have to wait
>> for the
>> package to be recompiled and put on the web page, which I suspect
>> will happen
>> soon.
>>
>> -Scott
>>
>>
>>