FlorianRhiem / pyGLFW

Python bindings for GLFW
MIT License
232 stars 36 forks source link

Bug: Changing CWD #1

Closed DataDave1337 closed 10 years ago

DataDave1337 commented 10 years ago

Using your API changes the current working directory. So i had problems including my shaders with relative path.

FlorianRhiem commented 10 years ago

Thank you for reporting this, David. I suspect you were working on Mac OS X when this happened? If so, this is not really a bug, but a GLFW feature (see: https://github.com/glfw/glfw/issues/174). Since the location of the python executable is completely different to the location of your script/application, this behavior clearly makes no sense at all for pyGLFW. So https://github.com/FlorianRhiem/pyGLFW/commit/0687ab72e854c9a4f171ba6d8f2aa3588f49feb6 makes glfw.init() save and restore the current working directory. Please let me know whether this fixed your issue. :)

DataDave1337 commented 10 years ago

Thank you, Florian. Now it works perfectly :)