Skip to content
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

Fails to run on Mac SDL2 dependency and OpenGL #6

Open
topcheese opened this issue Aug 10, 2023 · 4 comments
Open

Fails to run on Mac SDL2 dependency and OpenGL #6

topcheese opened this issue Aug 10, 2023 · 4 comments

Comments

@topcheese
Copy link

topcheese commented Aug 10, 2023

I forgot the exact command, but I think it's -glcore33 or something like it that I have to add in order to use any Sokol related libraries. I'm using an older Mac from 2011, so you may not want to support it.
I also had to do a "brew install pkg-config sdl2" for the first error.

Here is the last error.
Assertion failed: (desc->context.metal.device), function _sg_mtl_setup_backend, file sokol_gfx.h, line 10752.

Edit: It does run with the proper command. v -d darwin_sokol_glcore33

@larpon
Copy link
Owner

larpon commented Aug 11, 2023

Yes macOS is not very well tested yet. My own mac is very old and I do not have access to other hardware so mac development is slow.

Linux, Windows and Android is what I have the best access to currently so development is leaning towards those platforms. I know that all dependencies should work under mac, including using metal for rendering - it just needs time

@topcheese
Copy link
Author

Yes my MBP is from and 2011, so anything above that should support metal. I'll keep this mind when testing your framework. Thanks for the response and your work!

@larpon
Copy link
Owner

larpon commented Aug 12, 2023

I've just commited dbfa590.

This makes it so you can do e.g. v run ~/.vmodules/shy/examples/image/image.v without specifying any -d flags, and thus use OpenGL core 3.3 on macOS per default.

I think for now it is best to to make metal opt-in via -d metal. Please note that I haven't had time to actually implement proper Metal support. But it is on my (long) TODO list 😅

@larpon
Copy link
Owner

larpon commented Aug 12, 2023

Running my test project puzzle_vibes works and isn't too demanding:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants