[plt-scheme] Odd GL problem

From: Scott Owens (sowens at cs.utah.edu)
Date: Sun Jul 31 11:54:05 EDT 2005

SGL can only use enumeration constants that is knows about, and it doesn't 
know about any ARB constants.  The solution is to use the glGetString 
function from the (lib "gl.ss" "sgl") library and pass it the number that 
corresponds to the GL_PROGRAM_STRING_ERROR_ARB constant.

-Scott

On Sunday 31 July 2005 05:13 am, John Kozak wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> I've been mucking about with generating GPU programs via scheme,
> and have hit an odd problem.
>
> OpenGL defines a function "GetString" which returns assorted
> implementation data selected by an enum parameter. The fragment
> program GL extension adds an extra enum, program-error-string-arb,
> to get compilation error messages out.  Using an extended sgl.ss, I
> have a glut-based application which embeds mzscheme;
> (get-string 'program-error-string-arb) works fine in that.  But, in
> a mred gl-context, it doesn't; it fails with "invalid enum".  The
> equivalent C code called in the same contexts has the same behaviour,
> so I'm fairly sure it's not my extensions to sgl going wrong here.
> I get the same behaviour on a locally built (debian unstable) version
> of PLT 209, so I'm reasonably sure I'm linking against the right
> libraries; (get-string 'vendor) gives the expected answer (nvidia,
> not mesa) in all cases.
>
> Any thoughts?  I guessed that the wx stuff might be statically linking
> mesa or something but grepping the sources doesn't seem to bear that
> out.
>
> John



Posted on the users mailing list.