From 0593b9d8c5bb12739de712ee68fca3fafafd951f Mon Sep 17 00:00:00 2001 From: Sean Hickey Date: Tue, 6 Jul 2021 21:56:04 -0700 Subject: [PATCH] Add updates to use glfw-legacy. --- .gitignore | 5 +++++ README.md | 13 +++++++++++-- makefile | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ea092f --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*~ +cloth + +include +lib diff --git a/README.md b/README.md index 6b3d29e..8119827 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ OpenGL-Cloth A simple mesh cloth made with OpenGL -Thanks to this tutorial: +Thanks to this tutorial: http://gamedev.tutsplus.com/tutorials/implementation/simulate-fabric-and-ragdolls-with-simple-verlet-integration/ Essentially, the links in the mesh are modelled as simple springs. When they get stretched too far, they break. @@ -14,7 +14,16 @@ Space randomly flutters the mesh. ESC quits. Simple makefile included, so all you need to do is type "make". -Requires OpenGL, GLU, and glfw (which probably requires a few things for it to work). +Requires OpenGL, GLU, and glfw (which probably requires a few things +for it to work). + +This project was build with an old version of GLFW. It still works +mostly as-is if you clone the GLFW legacy code and build the old +version from source. Then symlink the `include` and `lib` directories +like this: + + ln -s path/to/glfw-legacy/include ./include + ln -s path/to/glfw-legacy/lib/x11 ./lib Feel free to use this code (although right now, it's kind of poorly organized...all in one big file). For any legal purposes, consider this Public Domain. diff --git a/makefile b/makefile index e309dd6..f5c6373 100644 --- a/makefile +++ b/makefile @@ -1,2 +1,2 @@ cloth : cloth.c - gcc cloth.c -std=gnu99 -o cloth -lGL -lGLU -lglfw -lm + gcc cloth.c -std=gnu99 -o cloth -Iinclude -Llib -lGL -lGLU -lglfw -lm