Closed onqtam closed 7 years ago
Thanks! This works with emscripten?
not directly, but after integrating a call to emscripten_set_main_loop
and ifdef-ing some glfw calls it worked.
I decided to go with the setup code from bigg instead of the one from the examples of bgfx (entry/input/utils/etc.) because after playing with and evaluating it for 2 days I decided it was too much baggage. So thanks for this!
You're welcome. Are you actually making use of this library? I was thinking about pushing some changes. I want to rename it from "bigg" since it's too close to "bimg," and while I was at it I wanted to remove glm (since I don't actually make use of it, I just added it for my own convenience).
Also I think the actual glue code between the libraries could be extracted out a bit more so that you didn't have to use my base application class. My intention was for this code to be as non-intrusive as possible, but I'm not sure how feasible that is just yet.
I used it as a starting point and I rewrote the classes to fit "my perfect view" of how things should be done :D
Application::reset()
is getting called twice in native builds - when initializing and on the first timeupdate()
is called (becauseglfwGetWindowSize()
returns the proper values and when compared to the uninitialized ones they are different). The first time the width/height are garbage values and are passed tobgfx::reset()
but the second call fixes that.This was a problem when building the example with emscripten for asm.js - took me a few hours to figure out why after
bgfx::init()
was successful my canvas disappeared.