stetre / moonglfw Goto Github PK
View Code? Open in Web Editor NEWLua bindings for GLFW
License: Other
Lua bindings for GLFW
License: Other
K, so copying over the folders resolved that missing make module error, moogl is now happy, moonglfw on the other hand wouldn't play ball (using the libraries generated by your makefile), I tried commenting out the LUA_PATH & LUA_CPATH overrides but it didn't fix the issue, so far this is all lua or your library reports of the issue:
glfwInit() failed
Any ideas what could be causing it? (am using official lua lib atm)
You can support GLFW 3.3.3 soon ?
Hello! I've been looking into embedding GLFW into my Lua/C++ application and I was evaluating this project as a potential option.
While trying to integrate the library and build a quick prototype, I encountered the following problems:
1.1. The bindings seem to explicitly target Lua 5.3 (and higher). Any chance to also support LuaJIT (5.1)?
1.2. There's no way to specify the Lua(JIT) include directory to use directly in the Makefile
1.3. luaopen_moonglfw
is defined in internal.h only, but not exposed via moonglfw.h (which I presume is the "public API"?)
Even if the above were resolved, there's still a few more questions:
2.1. Can the library be built without Vulkan support? I'm using WebGPU, which would target Metal on OSX and DX12 on Windows
2.2. It seems that the Init function attempts to load GLFW dynamically. If I'm embedding GLFW alongside moonglfw and linking statically to it, is there a way to use the functions it provides directly (no LoadLibrary
etc.)?
Note: By "is there a way" I mean "could it feasibly be made to work this way and if yes, what is the best approach?".
I'm happy to pitch in, but I don't know if this is a supported use case and how difficult it would be to make the changes required.
Thank you for your time, and for making this project :)
I'm considering writing my own glfw wrapper in lua 5.4, and I'm trying to decide if it would be better for me to just start from scratch or to fork this repo. For the latter to be viable, I would need conformation on:
a) If a new issue arises, would they be looked over in a reasonable time-frame (a few days to a week)
b) If I were to open an PR, would there be a dev wiling to do the review?
I know these small repos sometimes are just a one-time thing project and then the devs move on. This isn't a bad thing and I wouldn't fault anybody for it, I'm just trying to see if this is the case here.
Thank you,
C. Cords
Been trying to compile moongl, moonglfw and moonnuklear (after having given up on glut) with into my own (so I can follow full debug stack) and a number of errors popped up (the first lot I forgot to note down but were relatively easy to fix) but now I've gotten stuck at this point:
make --no-print-directory
clang -I cloned/lua -I cloned/moonnuklear -I cloned/moonglfw -I cloned/moongl -Wall -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE -DLINUX -o cloned/moonglfw/src/utils.c.o -c cloned/moonglfw/src/utils.c
cloned/moonglfw/src/utils.c:345:28: warning: declaration of 'struct timespec' will not be visible outside of this function [-Wvisibility]
static void sectots(struct timespec *ts, double seconds)
^
cloned/moonglfw/src/utils.c:347:7: error: incomplete definition of type 'struct timespec'
ts->tv_sec=(time_t)seconds;
~~^
cloned/moonglfw/src/utils.c:345:28: note: forward declaration of 'struct timespec'
static void sectots(struct timespec *ts, double seconds)
^
cloned/moonglfw/src/utils.c:348:7: error: incomplete definition of type 'struct timespec'
ts->tv_nsec=(long)((seconds-((double)ts->tv_sec))*1.0e9);
~~^
cloned/moonglfw/src/utils.c:345:28: note: forward declaration of 'struct timespec'
static void sectots(struct timespec *ts, double seconds)
^
cloned/moonglfw/src/utils.c:348:44: error: incomplete definition of type 'struct timespec'
ts->tv_nsec=(long)((seconds-((double)ts->tv_sec))*1.0e9);
~~^
cloned/moonglfw/src/utils.c:345:28: note: forward declaration of 'struct timespec'
static void sectots(struct timespec *ts, double seconds)
^
cloned/moonglfw/src/utils.c:359:20: error: variable has incomplete type 'struct timeval'
struct timeval tv;
^
cloned/moonglfw/src/utils.c:359:12: note: forward declaration of 'struct timeval'
struct timeval tv;
^
cloned/moonglfw/src/utils.c:360:8: warning: implicit declaration of function 'gettimeofday' is invalid in C99 [-Wimplicit-function-declaration]
if(gettimeofday(&tv, NULL) != 0)
^
cloned/moonglfw/src/utils.c:383:5: warning: implicit declaration of function 'usleep' is invalid in C99 [-Wimplicit-function-declaration]
usleep((useconds_t)(seconds*1.0e6));
^
cloned/moonglfw/src/utils.c:383:13: error: use of undeclared identifier 'useconds_t'
usleep((useconds_t)(seconds*1.0e6));
^
3 warnings and 5 errors generated.
make: *** [makefile:121: cloned/moonglfw/src/utils.c.o] Error 1
Compilation failed.
When I try to install with macOS Ventura, following the steps, I get the error ld: library not found for -llua5.4
. I installed [email protected] and luarocks like I was told to.
I'm on a MacBook air 2020 m1 running macOS ventura.
I don't use visual studio.
I am using an x86_64 MacBook Pro, I tried to see if the problem was with dlopen but it wasn't. It happens upon requiring moonglfw.
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.