17cupsofcoffee / tetra

🎮 A simple 2D game framework written in Rust
MIT License
916 stars 63 forks source link

Unable to run the examples on Mac OSX #146

Closed johanlindfors closed 4 years ago

johanlindfors commented 4 years ago

When trying to run the examples (hello_world and animation at least) I get this error:

Error: InvalidShader("ERROR: 0:1: \'\' : #version required and missing.\nERROR: 0:1: \'attribute\' : syntax error: syntax error\n")

This seems to only be on the master branch, release branch is working just fine.

17cupsofcoffee commented 4 years ago

I made some changes on master to try improve compatibility, but apparently I just made it worse 😅 I think I'm banned from making shader changes until I get my Mac environment set up...

I've reverted the changes for now - if you pull from master, it should hopefully fix the issue.

johanlindfors commented 4 years ago

Works like a charm!

Thanks for your work, tetra looks vert nice (first impressions). I have tried a couple of rust game engines (piston, amethyst) but they are a bit overwhelming for rapid prototyping and a new rust-developer such as myself.

Hope you get enough support, don't hesitate to reach out if you need help!

johanlindfors commented 4 years ago

Noticed that the 'shaders' example needs to have #version 150 to run...

17cupsofcoffee commented 4 years ago

Good spot! I found as part of #54 that OSX only seems to support shader level 140 and 150 when you're using OpenGL 3, must have forgotten to update that file when I fixed it...

And thank you for the kind words about Tetra - beginner friendliness/rapid prototyping is the sort of niche I'm aiming for with it, so if you run into any roadblocks, please let me know :)

Also, if you're looking for support using Rust for gamedev, I'd recommend joining the community Discord, which has a #games-and-graphics channel.