For Programmers: Free Programming Magazines  


Home > Archive > Scheme > December 2006 > DrScheme: what does the "send" function do?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DrScheme: what does the "send" function do?
GhostUnit

2006-12-23, 7:04 pm

Greetings,

I want to make a program that uses opengl in scheme (using the sgl
library of DrScheme).

I'm analyzing the sample code at NeHe productions
http://nehe.gamedev.net/data/lesson...n.asp?lesson=01
but I can't figure out where to get documentation on many things, for
example the "send" function in the example below:

;; This function calls gl-init once and then sets itself to call
gl-draw
(define (gl-thunk)
(if (send glcontext ok?)
(begin
(send glcanvas with-gl-context gl-init)
(send glcanvas with-gl-context gl-draw)
(send glcanvas swap-gl-buffers)
(set! gl-thunk
(lambda ()
(send glcanvas with-gl-context gl-draw)
(send glcanvas swap-gl-buffers))))
(begin
(display "Error: OpenGL context failed to initialize")
(newline)
(exit))))

can someone help me figure out what this function does? I'm new to
Scheme.

GhostUnit

2006-12-23, 7:04 pm

DrScheme's HelpDesk provided me with the documentation, so no need to
reply. Can this post be deleted?

GhostUnit wrote:
> Greetings,
>
> I want to make a program that uses opengl in scheme (using the sgl
> library of DrScheme).
>
> I'm analyzing the sample code at NeHe productions
> http://nehe.gamedev.net/data/lesson...n.asp?lesson=01
> but I can't figure out where to get documentation on many things, for
> example the "send" function in the example below:
>
> ;; This function calls gl-init once and then sets itself to call
> gl-draw
> (define (gl-thunk)
> (if (send glcontext ok?)
> (begin
> (send glcanvas with-gl-context gl-init)
> (send glcanvas with-gl-context gl-draw)
> (send glcanvas swap-gl-buffers)
> (set! gl-thunk
> (lambda ()
> (send glcanvas with-gl-context gl-draw)
> (send glcanvas swap-gl-buffers))))
> (begin
> (display "Error: OpenGL context failed to initialize")
> (newline)
> (exit))))
>
> can someone help me figure out what this function does? I'm new to
> Scheme.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com