Comments (5)
Hi!
I don't have Mac Os X, but i know several solutions that working on Linux Mint.
First way. Put library (libglfw.so in my case) in directory with example files.
-- './libglfw.3.1.dylib' in your case
local glfw = require 'glfw' ('./libglfw.so')
Second way. Using precise path to library.
-- '/opt/local/lib/libglfw.3.1.dylib' in your case
local glfw = require 'glfw' ('/usr/local/lib/libglfw.so')
Third way. Function ffi.load doesnโt use package.cpath, but we can easy solve it.
-- '/opt/local/lib/?.dylib' in your case, and 'libglfw.3.1' as name
-- also, package.cpath may be used instead of libpath
local libpath = '/usr/local/lib/?.so;'
local glfw = require 'glfw' (package.searchpath('libglfw', libpath))
from luajit-glfw.
Thanks @Playermet , I got it working with this:
local glfw = require 'glfw' ('/opt/local/lib/libglfw.3.dylib')
Didn't realize you can change the library it points to on the another argument.
Thanks for the quick answer!
Although when trying to run the examples, they just crash on my Os X system, maybe because the rendering is not doing anything? Not sure.
from luajit-glfw.
Examples should show black screen, without crashes.
Try insert this line before glfw.Init call:
glfw.SetErrorCallback(print)
What printed to the console after run?
from luajit-glfw.
Actually now that I test again, the examples work, showing the empty buffer (black with some glitches from the uninitialized memory). Strange. Anyway, I guess this can be closed, thanks!
from luajit-glfw.
You're welcome!
from luajit-glfw.
Related Issues (5)
- Plain Lua + FFI support HOT 1
- Can't run any opengl command HOT 2
- Query: GLFW 3.3.0 support HOT 3
- code don't work HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luajit-glfw.