-
Notifications
You must be signed in to change notification settings - Fork 4
[build] macOS support (without trivial-main-thread) #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| *.fasl | ||
| *.fas | ||
| *.so | ||
| *.dylib | ||
| lib/ | ||
| raylib.h | ||
| shim.h |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -328,5 +328,24 @@ clean: | |
|
|
||
| This copies the underlying =.so= files into a =lib/= local to your application, so | ||
| that when the =raylib= system loads, it will find them where it expects. | ||
| ** macOS | ||
| On macOS the window must be created on the main thread. This can be accomplished | ||
| using `trivial-main-thread` with something like: | ||
|
|
||
| #+begin_src common-lisp | ||
| (defun launch () | ||
| (raylib:init-window +screen-width+ +screen-height+ "My Game") | ||
| ;; Game loop, drawing etc ... | ||
| ) | ||
|
|
||
| (defun main () | ||
| ,#+darwin | ||
| (trivial-main-thread:with-body-in-main-thread () | ||
| ,#+sbcl | ||
| (sb-int:set-floating-point-modes :traps '()) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any idea why this ended up being necessary?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found this explanation in the Update: I ran a quick test and unfortunately it seems that drawing calls such as
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Roger, thanks for the update. |
||
| (launch)) | ||
| #-darwin | ||
| (launch)) | ||
| #+end_src | ||
|
|
||
| ** Creating Release Builds | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, so it looks like
trivial-main-threadconcerns can be pushed to the level of the application and be kept out of the lib.