sergiorzmasson / babylonnativeglfw Goto Github PK
View Code? Open in Web Editor NEWExample on how to create a cross platform application using GLFW and react native.
License: MIT License
Example on how to create a cross platform application using GLFW and react native.
License: MIT License
Hi Sergio,
Following the instructions to build the application example leads to a crash when executed.
Below are traced from gdb.
>> gdb ./BabylonNativeExample
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./BabylonNativeExample...
(gdb) r
Starting program: /media/parminder.singh/aux_2tb/gfx/nativewiz/BabylonNativeGLFW/build/BabylonNativeExample
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff315a700 (LWP 20677)]
[New Thread 0x7fffe2952700 (LWP 20678)]
[New Thread 0x7fffe20dd700 (LWP 20679)]
[New Thread 0x7fffdb9fe700 (LWP 20680)]
[New Thread 0x7fffdb1fd700 (LWP 20681)]
[New Thread 0x7fffda9fc700 (LWP 20682)]
[New Thread 0x7fffda1fb700 (LWP 20683)]
[New Thread 0x7fffd99fa700 (LWP 20684)]
[New Thread 0x7fffd91f9700 (LWP 20685)]
[New Thread 0x7fffd89f8700 (LWP 20686)]
[New Thread 0x7fffcffff700 (LWP 20687)]
[New Thread 0x7fffcf7fe700 (LWP 20688)]
Thread 1 "BabylonNativeEx" received signal SIGSEGV, Segmentation fault.
0x0000555555c55500 in std::__uniq_ptr_impl<Babylon::Plugins::NativeInput::Impl, std::default_delete<Babylon::Plugins::NativeInput::Impl> >::_M_ptr() const ()
Below are the steps I followed for build:
git clone --recurse-submodules -j8 https://github.com/SergioRZMasson/BabylonNativeGLFW.git
npm install
mkdir build
cd build
cmake .. -G Ninja -D NAPI_JAVASCRIPT_ENGINE=V8
ninja
Execute: ./BabylonNativeExample
Crash!
The current project is already configured with "chai": "^4.3.4"
in package.json and install the chai lib in node_modules folder.
However, when I try to use it in game.js
it gives me an error on my MacOS build:-
Uncaught Error: Can't find variable: chai
I have added a reference of chai lib in CMakeList.txt:-
set(SCRIPTS
"node_modules/chai/chai.js"
"Scripts/game.js"
"Scripts/ammo.js"
"Scripts/meshwriter.min.js"
"Scripts/recast.js")
Finally, following is the code I have added to the game.js
:-
/// <reference path="../node_modules/chai/chai.js" />
const expect = chai.expect;
Am I missing some configuration in Babylon Native to properly include npm packages?
Further, where can I find some projects on Babylon Native other than the official repo?
Unable to make a pull request because of the access rights to the current repo.
This bug can be fixed following way:-
void mouse_button_callback(GLFWwindow *window, int button, int action, int mods)
{
if (s_showImgui)
{
ImGuiIO& io = ImGui::GetIO();
io.AddMouseButtonEvent(button, action);
if (io.WantCaptureMouse)
return;
}
// . . . .more code goes here
}
Hi Sergio,
Thanks for researching this topic, I am indeed looking for surfacing with GLFW.
I am building the master branch MacOS. The project builds successfully. However, I am unable to see anything. It seems that the GLFW appears with a black canvas.
Build steps:
git clone --recurse-submodules -j8 https://github.com/SergioRZMasson/BabylonNativeGLFW.git
cd Dependencies/BabylonNative
cd Apps
npm install
cd ../../
npm install
mkdir build
cd build
cmake .. -G "Xcode"
Am I missing something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.