auRose94 / nim-bgfx

BGFX wrapper for the nim programming language.
BSD 2-Clause "Simplified" License
46 stars 6 forks source link

Examples freeze on OSX #1

Closed zacharycarter closed 7 years ago

zacharycarter commented 7 years ago

Not sure if you're actively maintaining this project or not, but either way thank you for working on it. I had to do fix a few errors in code to get the examples and bgfx.nim to compile. Also some of the bgfx header file names have changed, but once all those things were resolved, the example started up fine.

The example freezes on OSX however once BGFX initializes. I'll do some digging to see if I can't figure out why.

auRose94 commented 7 years ago

Sorry, I'm a freelancer and I had to defend one of my clients from a Russian hack attack for his website. I've never really tested OSX compatibility. I can look at it sometime today or tomorrow. Some question though. Are you using the latest version of nim? Was bgfx built with the same compiler nim is using to build the examples? And are all the examples bad or just one?

auRose94 commented 7 years ago

Hey, Let me know if the examples work now. I got it running on OSX! I removed the threading I had added and let bgfx handle the rendering thread. Here is some notes on getting it working in OSX.

  1. I have /usr/local/include/bgfx, /usr/local/include/bx, /usr/local/include/compat, usr/local/include/tinystl installed from the repositories. I'm going to eventually make a homebrew formula for both.
  2. I have the latest homebrew version of nim and glfw3 installed.
  3. I have my branch of nimrod-glfw installed.
  4. I moved the correct dylibs (libglfw3 and libbgfx-shared) to the executable directories for each example.
  5. The current directory needs to be the same directory as the example because of how nim loads the dylib. Just make sure the program can find the dylibs in the current directory.

Let me know if it doesn't work for you.

I will do an update to nim-bgfx and get it synced to the latest version of bgfx tomorrow.

auRose94 commented 7 years ago

nim-bgfx is now synced up to bgfx version 3.5!