gl-function-pointer ( names n -- funptr )


Vocabulary
opengl.gl.extensions

Definition
USING: arrays assocs kernel namespaces opengl.gl.gtk sequences
;

IN: opengl.gl.extensions

: gl-function-pointer ( names n -- funptr )
gl-function-context 2array
dup +gl-function-pointers+ get-global at
[ 2nip ] [
[
[ gl-function-address ] map [ ] find nip dup
[ "OpenGL function not available" throw ] unless
dup
] dip +gl-function-pointers+ get-global set-at
] if* ;