开发者

what is the most effective way to be able to use all opengl libraries developing application for webgl?

i need to use some physics library for example bulletphysics in C++ in a physics simulation application. there is a restricton that i must use webgl and javascript. i googled and saw using emscripten, some libs has been ported to javascript but some people say that code uses too much cpu and memory and is not effective. also i searched for a way to develop code in c++ and port it to javascript, i found out emscripten but have given up because of inefficiency. also i found mandreel but it is not free and i need a free way at first plan. at this point i want to ask how can i use opengl libs that i need 开发者_Go百科through webgl by the most effective way? thanks


Most physics simulation libraries are tailored for compilation into native code, some may even use assembly at some time critical parts. So porting that to JavaScript will be very hard. I think the best thing to do, and in your case since it's home what what's probably expected is, that you write the stuff in JavaScript directly.

And just to get this clear: OpenGL just draws stuff. It's not a game or simulation framework. Bullet Physics is not OpenGL, ODE is not OpenGL. Just because most programs that use Bullet or ODE render stuff, this does not imply that this has something to do with OpenGL in the first place.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜