cloud9上でnodeからopenGLを動かしたいのですが、WebGLContextが取得できなくて困っています。
bash
1$ sudo apt install -y build-essential \ 2 libxi-dev \ 3 libxmu-dev \ 4 cmake \ 5 libx11-dev \ 6 xorg-dev \ 7 libglu1-mesa-dev \ 8 freeglut3-dev \ 9 libglew1.5 \ 10 libglew1.5-dev \ 11 libglu1-mesa \ 12 libglu1-mesa-dev \ 13 libgl1-mesa-glx \ 14 libgl1-mesa-dev \ 15$ npm i gl 16$ (cd node_modules/gl; npm rebuild) 17$ node 18# ./node_modules/gl/node_index.js の中身をいじってエラーを出力させるようにしています。 19> require('gl')(122,211) 20Error: Error creating WebGLContext 21 at createContext (/home/ubuntu/workspace/node_modules/gl/node_index.js:39:10) 22 at repl:1:14 23 at ContextifyScript.Script.runInThisContext (vm.js:50:33) 24 at REPLServer.defaultEval (repl.js:240:29) 25 at bound (domain.js:301:14) 26 at REPLServer.runBound [as eval] (domain.js:314:12) 27 at REPLServer.onLine (repl.js:468:10) 28 at emitOne (events.js:121:20) 29 at REPLServer.emit (events.js:211:7) 30 at REPLServer.Interface._onLine (readline.js:282:10) 31null 32> require('bindings')('webgl') 33{ WebGLRenderingContext: [Function: WebGLRenderingContext], 34 cleanup: [Function], 35 setError: [Function], 36 path: '/home/ubuntu/workspace/node_modules/gl/build/Release/webgl.node' } 37>
基本的には公式サイトを参考にパッケージはダウンロードしましたが、色々調べるうちにこの量にってしまいました。公式に載ってる以外のパッケージは必要ないと思いますが念のため載せておきます。
デバックの知見がなく、これ以上何を試したらいいのか分からないので、解決方法や原因究明の仕方をご教授いただけたらと思います。
よろしくお願いします。
あなたの回答
tips
プレビュー