Permalink
Browse files

Fallback GetProcAddress bindings so things will Just Work on common c…

…onfigurations.
  • Loading branch information...
1 parent 0814d10 commit 6ac74f2df6fe1579749c4a821bc5e92101190199 @Ralith committed Nov 1, 2011
Showing with 14 additions and 1 deletion.
  1. +14 −1 gl/bindings.lisp
View
@@ -99,8 +99,21 @@
;;; wglGetProcAddress(), etc.
(defparameter *gl-get-proc-address* nil)
+;;; Fallback get-proc-address bindings which should work for common
+;;; configurations
+;;; TODO: Darwin
+#+linux
+(defcfun ("glXGetProcAddress" glx-get-proc-address) :pointer
+ (proc-name :string))
+#+win32
+(defcfun ("wglGetProcAddress" wgl-get-proc-address) :pointer
+ (proc-name :string))
+
(defun gl-get-proc-address (name)
- (funcall *gl-get-proc-address* name))
+ (funcall (or *gl-get-proc-address*
+ #+linux #'glx-get-proc-address
+ #+win32 #'wgl-get-proc-address)
+ name))
(eval-when (:load-toplevel :execute)
#+clisp (pushnew 'reset-gl-pointers custom:*fini-hooks*)

0 comments on commit 6ac74f2

Please sign in to comment.