[plt-scheme] opengl binding

From: Scott Owens (sowens at cs.utah.edu)
Date: Sun Sep 18 16:23:02 EDT 2005

On Sep 18, 2005, at 2:06 PM, Hans Oesterholt wrote:

> Got it working with glVertex2f, however I'd rather have it working  
> like:
> (define point (make-vector (<calculate x>) (<calulate y>) ))
> (glVertex2fv point)

I suggest
(define point (gl-float-vector (<calculate x>) (<calulate y>) ))
(glVertex2fv point)

> BTW. I needed to include opengl-enum.scm from my own
> binding to get the right enumerations.

I don't understand.

> I personally like
>  gl-projection-matrix
> better then
> Would it be an option to adopt the constants from opengl-enum.scm?

The philosophy behind gl.ss is to be as much like the C-language GL  
API as possible.  The philosophy behind sgl.ss is to present a more  
Scheme-like interface.  I would rather not have both of these  
interfaces, but each one has compelling reasons to exist.  I am  
hesitant to add a third interface option.

Enumeration constants in sgl.ss are handled thusly:

(require (prefix gl- (lib "sgl.ss" "sgl")))
(gl-begin 'quad-strip)

There are several examples of SGL usage in the collects tree:  
alpha.ss and gears.ss in collects/sgl/examples,
and the checkers, jewel, and gobblet games in collects/games.
Some of these use sgl.ss, and others use gl.ss.


Posted on the users mailing list.