Irrlicht browserplugin: Google Native Client

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
centipede
Posts: 16
Joined: Sat Feb 18, 2006 6:35 pm

Irrlicht browserplugin: Google Native Client

Post by centipede »

Hi all,

Not many people are right now aware of this but Google has an ongoing effort which is no less than brilliant: A plugin which allows execution of binary x86 code inside the browser. And it really looks secure!

http://code.google.com/p/nativeclient

How does it work? (Skip this if you want to see my announcement further down)

You should read the whitepaper first to get a grip of the security model. The concepts are a modified gcc which changes the assembler code a bit to make jumps, branches etc. more visible and a code veryfier that simple chews the binary's machine code and dissallows it if any kind of x86 construction does not adhere to a simple ruleset making it very transparent what actions the code takes (hence the need to use a modified gcc. The security relies on the veryfier, not the use of a particular gcc).
On top of that they confine the binary in as much as two security layers, which I guess is using the usual OS tricks for containment and which only lets through a very limited set of system calls all being captured and dealt with in the plugin's lowest layer, not in the running system kernel of course.

The sum of this is that you can compile any statically linked binary which only uses that limited set of system calls and run it in the browser. At the moment you cannot open files from the local machine, neither can you use OpenGL and lots of other things quite impossible. Instead you get a very limited SDL-like interface to showing graphics and getting user input and a few other things: http://nativeclient.googlecode.com/svn/ ... index.html

The nice thing about this is that once the user has installed that plugin, they will not have to be presented with any further hassle to download and run binaries inside the plugin.

Irrlicht for Google Native Client

... And yes, I have taken the liberty to hack a version of Irrlicht together which works using the software renderer inside the plugin. The tested examples work as well :)
http://groups.google.com/group/native-c ... 1a3cfd2dfe#

The latest instructions from that mail is here...

Code: Select all

Prepare:
    cd <nacl>/googleclient/native_client/tests
    wget http://atomicmonstergirls.net/work/nacl/nacl-irrlicht-0.5.tar.gz
    tar -xzf nacl-irrlicht-0.4.tar.gz
    cd irrlicht
    ./Irrlicht-Setup-and-Patch.sh

Build:
    ./Irrlicht-Build.sh
Run:
    firefox testirrlicht.html
You will of course have to get acquainted with the NaCl project a bit first. Just follow the getting started guide... http://nativeclient.googlecode.com/svn/ ... arted.html

Since the software renderes aren't amongst the fastest, I'm working now and then on a faster software renderer. But in the long run, I'm quite convinced that Google will add an OpenGL interface to the API. I just couldn't wait..

Best regards,
Rene Jensen / centipede

EDIT: Screenshots: http://atomicmonstergirls.net/work/nacl ... shot01.png
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Hey that's great news! I have to say that Burning's renderer is blindingly fast, did you remember to set it to low quality in IrrCompileConfig.h? Also _very important_ you should enable FAST_MATH for a decent speed increase.

In terms of more software drivers, I have a realtime raytracing driver in the works, you can try it out here: http://ompf.org/forum/viewtopic.php?f=8&t=1246 (No source yet but I may release the lib and headers soon to get some feedback).

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
centipede
Posts: 16
Joined: Sat Feb 18, 2006 6:35 pm

Post by centipede »

Hah, that's a pretty neat project you have there.

Low quality, check. Fast math..? Can't remember having played with that flag. I'll get back here with updated info. Thanks.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

The exact name is "IRRLICHT_FAST_MATH", just have that defined at compile time.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
centipede
Posts: 16
Joined: Sat Feb 18, 2006 6:35 pm

Post by centipede »

Ehm.. It turns out I forgot to compile with NDEBUG :oops:

Compiling with optimization (-O3 etc.) gives quite a bit. Compiling with IRRLICHT_FAST_MATH also gives something. But the two together seems to cause a problem: No triangles are rendered. I can still see text/glyph rendering on the screen, but nothing else. If I turn the optimization down to -O1, rendering works again. Don't know where the problem might be.

I'll upload later today with the few changes I have in this experiment.

Regards, Rene
centipede
Posts: 16
Joined: Sat Feb 18, 2006 6:35 pm

Post by centipede »

Whoops, sorry. I forgot to mention that I've uploaded the modified version here using NDEBUG. The Burning renderer is doing fine with small scenes:

http://atomicmonstergirls.net/work/nacl ... 0.6.tar.gz

Same instructions as on top of this thread.
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Re: Irrlicht browserplugin: Google Native Client

Post by roxaz »

does anyone have saved a latest copy of this? links are long dead..
Post Reply