Changeset 15450


Ignore:
Timestamp:
Aug 26, 2012, 12:39:41 PM (7 years ago)
Author:
gb
Message:

Unscramble #_glutInit arguments. Fixes ticket:1009 in the trunk.
Conditionalize startup code for Darwin/Linux?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/examples/opengl-ffi.lisp

    r13474 r15450  
    3939      (when (not glut-initialized-p)
    4040        (ccl::with-string-vector (argv command-line-strings)
    41           (rlet ((argvp (* t))    ; glutinit takes (* (:signed 32)) and (* (* (:unsigned 8)))
    42                  (argcp :signed)) ; so why are these declared as (* t) and :signed?
    43             (setf (%get-long argcp) (length command-line-strings)
    44                   (%get-ptr argvp) argv)
    45             (#_glutInit argcp argvp)))
     41          (rlet ((argcp :int (length command-line-strings)))
     42            (#_glutInit argcp argv)))
    4643        (setf glut-initialized-p t))))
    4744  ;; When a saved image is restarted, it needs to know that glut
     
    133130    (error "This is a GLUT example; it can't possibly work ~
    134131                 in a GUI environment.")))
     132
     133#+darwin-target
    135134(progn
    136135  (ccl:process-run-function
     
    155154     (ccl::toplevel))))
    156155
     156#-darwin-target
     157(process-run-function "GLUT Main" #'2dgasket::main)
    157158
     159
     160
Note: See TracChangeset for help on using the changeset viewer.