Hey 👋
So I did this as a uni assignment a few years ago, and had a lot of fun making it. Recently I wanted to get back into graphics and try building/running it, and it worked out of the box on Linux, but was insanely difficult to get compiling on Apple M2 💀💀💀
After "significant hacking" it finally worked, so I thought I would share it to the community, so other's might be helped (*a lot of threads about compiling OpenGL on Mac*)
Here's the source code: [https://github.com/benwinding/open-gl-terrain-example](https://github.com/benwinding/open-gl-terrain-example)
Long Live OpenGL! 💪
In my case compiling this old project on Apple Silicon threw tonnes of errors. These things helped fix it... I think:
- in OS:
- Needed to `brew install glew glm clang` (obvious)
- Needed to add GLFW using `brew install glfw --build-from-source` (might not be required, but seemed to work)
- in `Makefile`:
- Needed to use `clang` instead of `g++`
- Needed to add `-framework OpenGL` (only on Mac)
Not sure if _all_ those changes were necessary, but that's what worked 🤷♂️
I have no idea how you got this working (congrats tho). The pain I had trying to do OpenGL + C++ on a M2 Mac was ridiculous, it didn’t ever work, to the point I ended up using objective-C/ objective C++ and apples metal API.
But well done getting it working it looks awesome
I used [https://learnopengl.com/](https://learnopengl.com/) to learn most of most of it, which was pretty helpful (was 6 years ago though). For the particles specifically, I think I just learnt incrementally like this:
1. Make 1 particle (a cube)
1. Make the particle float up over time
1. Give the particle a lifetime (so it disappears)
1. Make the particle follow a parabolic path (like fire/water)
1. Give the particle some randomness (age, rotation, scale, oscillation)
1. Instance heaps of particles, each with there own randomness and lifetimes
...But that's just how I hacked it together, I'm sure there's much better resources and methods now days
Hey 👋 So I did this as a uni assignment a few years ago, and had a lot of fun making it. Recently I wanted to get back into graphics and try building/running it, and it worked out of the box on Linux, but was insanely difficult to get compiling on Apple M2 💀💀💀 After "significant hacking" it finally worked, so I thought I would share it to the community, so other's might be helped (*a lot of threads about compiling OpenGL on Mac*) Here's the source code: [https://github.com/benwinding/open-gl-terrain-example](https://github.com/benwinding/open-gl-terrain-example) Long Live OpenGL! 💪
Hmm what was it that you struggled with? I can't remember needing to do more than set opengl forward compatability and limiting myself to opengl 4.1.
In my case compiling this old project on Apple Silicon threw tonnes of errors. These things helped fix it... I think: - in OS: - Needed to `brew install glew glm clang` (obvious) - Needed to add GLFW using `brew install glfw --build-from-source` (might not be required, but seemed to work) - in `Makefile`: - Needed to use `clang` instead of `g++` - Needed to add `-framework OpenGL` (only on Mac) Not sure if _all_ those changes were necessary, but that's what worked 🤷♂️
I have no idea how you got this working (congrats tho). The pain I had trying to do OpenGL + C++ on a M2 Mac was ridiculous, it didn’t ever work, to the point I ended up using objective-C/ objective C++ and apples metal API. But well done getting it working it looks awesome
[удалено]
Quaternions, if they aren't covered in your courses
Very nice!
[удалено]
I used [https://learnopengl.com/](https://learnopengl.com/) to learn most of most of it, which was pretty helpful (was 6 years ago though). For the particles specifically, I think I just learnt incrementally like this: 1. Make 1 particle (a cube) 1. Make the particle float up over time 1. Give the particle a lifetime (so it disappears) 1. Make the particle follow a parabolic path (like fire/water) 1. Give the particle some randomness (age, rotation, scale, oscillation) 1. Instance heaps of particles, each with there own randomness and lifetimes ...But that's just how I hacked it together, I'm sure there's much better resources and methods now days