OGRE port to NaCl (Google's Native Client)

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: OGRE port to NaCl (Google's Native Client)

Post by duststorm »

Assaf Raman wrote:Google changed the way gl is initialized in NaCl, pushed a new Chrome beta to the users, but didn't provide a new SDK, meaning my OGRE NaCl port doesn't work!
I will fix it as soon as the new NaCl SDK is released (v0.6).
Guess that's why it's still in early beta: it will break on you ;)

I haven't tried porting my app to NaCl yet, but have been browsing the documentation briefly to see which parts will be portable and which parts might not. Does anyone know whether you can open network sockets using NaCl, or are you restricted to HTTP requests?

I'm using some Qt libraries in my app, and seem to be in luck since there is an effort to port qt to Native Client. Though I don't think the networking is supported (yet).

Just out of curiosity: would berkelium work in NaCl? :)
Developer @ MakeHuman.org
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

No clue about berkelium, regarding TCP - currently it is very restricted, smiler to what you have in javascript.
I think this P2P work will be released in the near future and be supported then also in NaCl.
Watch out for my OGRE related tweets here.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

I think this P2P exists in the current SDK. Search for it.
Watch out for my OGRE related tweets here.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

With the help of Google's NaCl discussion group I was able to get the link to the NaCl SDK latest build - meaning a nightly build.
I think that if I will use it to build OGRE - the sample browser will work once more in Chrome Beta.
I will compile later today and update you.
Watch out for my OGRE related tweets here.
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: OGRE port to NaCl (Google's Native Client)

Post by duststorm »

Assaf Raman wrote:I think this P2P exists in the current SDK. Search for it.
Thanks for that! :)
Apparently it does. This test illustrates setting up a TCP connection. You can search for the comment "// Creating reliable (TCP-like) connection and try sending data over"

It seems to be possible. I guess I will have to reimplement the QSocket class I'm using to work with NaCl, if qt doesn't beat me to it ;)
Developer @ MakeHuman.org
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

https://groups.google.com/group/native- ... 027fc80e9c
Hi Assaf,

Reconciling the Chrome version with the latest SDK version can be a bit tricky. First of all, we don't currently do automated testing of the SDK against a particular Chrome browser, although we would like to add this functionality soon. That means there's no guarantee that an SDK will even work with Chrome until we complete our manual testing plan, which typically happens sometime after each Chrome branch is created.

That said, to get the most accurate Chrome version that has the best chance of working with a particular SDK, you can follow these steps, roughly:

Look at the src/DEPS file in the NaCl SDK Subversion repository and find the variable named "native_client_version" (e.g., 6511). If you don't want to check-out the repository, you can see http://nativeclient-sdk.googlecode.com/ ... k/src/DEPS
Look at the DEPS file in the NaCl repository at "native_client_version" (or earlier). See http://src.chromium.org/viewvc/native_c ... S?view=log. After clicking on 'View' for the matching version, look for "chrome_ppapi_rev". This is the version of Pepper that was built into the SDK, so you should have the best luck running a build of Chromium that is close to that revision.


See http://www.chromium.org/nativeclient/sd ... -with-nacl for a related discussion.

Cheers,
-Matt
Watch out for my OGRE related tweets here.
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: OGRE port to NaCl (Google's Native Client)

Post by duststorm »

Maybe the best way to make this work at the moment is to do it like berkelium does it.
For each release you indicate with which version of chromium it should be used, and you only support certain versions of it.
Of course, when the goal is to distribute your ogre application to a broad audience, you don't want to require them to install a specific version of the browser, but just want to say: update to a recent version.

I guess that will follow whenever this thing exits out of beta (which might take a while), or at least becomes a bit more stable.
Developer @ MakeHuman.org
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

Yes, this is what I am going to do.
Watch out for my OGRE related tweets here.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

The OGRE NaCl sample is working once more, with faster loading (it is on a site with more bandwidth), I also added a progress bar for the loading and resource downloading.
Try it out here: http://goo.gl/RVl4h

You can get the site template I used here (SVN repo): http://ogre3d-nacl-demos.googlecode.com/svn/trunk/ogre/
Watch out for my OGRE related tweets here.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

Well, I used an older version of Chrome dev channel, when I just updated to the latest version - 3d stopped to work. I opened up an issue for the problem: http://code.google.com/p/nativeclient/i ... id=2258#c0
Watch out for my OGRE related tweets here.
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: OGRE port to NaCl (Google's Native Client)

Post by duststorm »

I haven't been succesful to run it yet.
Any clue to what versions of the browser work with it? (does 15.0.874.12-dev work?) Also, does google offer a way of obtaining previous versions of the dev channel browser in binary form? I don't really feel like setting up a build.
Developer @ MakeHuman.org
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

Sorry about that, I hope Google will resolve the new issue this week and you can try it out, I will post as soon as it happens.
Regarding nightly builds, try:
http://build.chromium.org/f/chromium/snapshots
and
http://build.chromium.org/f/client/nacl ... dk/latest/

I haven't been able to find a Chromium that works with the latest NaCl SDK (the one I used to build the latest OGRE sample) - so don't waste your time on it for now... :D

I am sure Google will fix the issue in a few days...
Watch out for my OGRE related tweets here.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

Google fixed the issue last night, you can see the sample working here: http://goo.gl/RVl4h
Use the NaCl SDK nightly build and the latest trunk code and you should be good to go.
Watch out for my OGRE related tweets here.
handcircus
Halfling
Posts: 43
Joined: Wed Apr 05, 2006 8:00 pm
x 2

Re: OGRE port to NaCl (Google's Native Client)

Post by handcircus »

Hey Assaf,

Great work! This is exciting, look forward to playing around more. I'm getting a error when loading the zips (Mac, Lion 10.7.1, Chome 15.0.874.15). Not sure if you tested on mac yet, or if theres anything I can help with?

(output below)

<CUT>
tumbler.js:91Registering ResourceManager for type BspLevel
tumbler.js:91Creating resource group Essential
tumbler.js:91Added resource location 'Essential.zip' of type 'EmbeddedZip' to resource group 'Essential'
tumbler.js:91Creating resource group Popular
tumbler.js:91OGRE EXCEPTION(7:InternalErrorException): Popular.zip - error whilst opening archive: Unknown error. in ZipArchive::checkZzipError at C:/hg_Code/ogre/ogre_nacl/src/OgreMain/src/OgreZip.cpp (line 297)
tumbler.js:91OGRE EXCEPTION(7:InternalErrorException): Popular.zip - error whilst opening archive: Unknown error. in ZipArchive::checkZzipError at C:/hg_Code/ogre/ogre_nacl/src/OgreMain/src/OgreZip.cpp (line 297)
HandCircus Game Studio - http://www.handcircus.com - Creators of Rolando and Rolando 2
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

I saw this error before, it is related to bug in Chrome that corrupt the downloaded files from time to time.
Clear Chrome cache and reload the page.
Watch out for my OGRE related tweets here.
handcircus
Halfling
Posts: 43
Joined: Wed Apr 05, 2006 8:00 pm
x 2

Re: OGRE port to NaCl (Google's Native Client)

Post by handcircus »

Clearing cache didn't seem to fix the problem, but serving from a local MAMP server worked perfectly. Will follow this with interest :)
HandCircus Game Studio - http://www.handcircus.com - Creators of Rolando and Rolando 2
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

Google will fix this bug.
They are reading this thread - so be sure it will be fixed.
Watch out for my OGRE related tweets here.
User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
x 5
Contact:

Re: OGRE port to NaCl (Google's Native Client)

Post by _tommo_ »

[s]Just out of curiosity, since I was toying with the idea of a similar port:
all the NaCL demo I saw lacked completely any indicator of downloading progress, so the user would just get a blank page with some "wait please don't run away" in it.
Is there a way to show some animated loading screen while the actual app is dowloading, maybe with graphics and a progress meter?
I know this isn't strictly NaCL-related, but to me is something vital to a technology like this one![/s]

Nevermind :mrgreen:
Last edited by _tommo_ on Tue Sep 20, 2011 11:31 pm, edited 1 time in total.
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

Our demo shows downloading progress, I guess you haven't tried the latest version of it.
Watch out for my OGRE related tweets here.
User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
x 5
Contact:

Re: OGRE port to NaCl (Google's Native Client)

Post by _tommo_ »

Assaf Raman wrote:Our demo shows downloading progress, I guess you haven't tried the latest version of it.
:oops:

Now it stopped working for me, but my Chrome version should be too old (14.0 beta).
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

Try the Google Chrome dev version and the demo will work.
Or wait a month and a half for Google Chrome 15 to be released.
Watch out for my OGRE related tweets here.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

Check this out - OGRE NaCl sample browser in the Chrome web store - http://goo.gl/2ztrR
Works with Chrome dev channel (Chrome 15) - without any special flags and such.
Watch out for my OGRE related tweets here.
User avatar
Jabberwocky
OGRE Moderator
OGRE Moderator
Posts: 2819
Joined: Mon Mar 05, 2007 11:17 pm
Location: Canada
x 218
Contact:

Re: OGRE port to NaCl (Google's Native Client)

Post by Jabberwocky »

Nice work Assaf, very cool stuff.
Image
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: OGRE port to NaCl (Google's Native Client)

Post by Assaf Raman »

The demo stopped working for me, turns out that Chrome dev channel is now version 16 - and NaCl doesn't work in that version.
The way to fix it is to uninstall Chrome, then install Chrome Beta channel - now version 15.
Google keeps playing with the test version, but this progress, Chrome 15 with the 3d support for NaCl just turned Beta - meaning that it is not long before they will release it and we can stop with this all "install a special version of Chrome for this to work" nonsense.
Watch out for my OGRE related tweets here.
User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
x 5
Contact:

Re: OGRE port to NaCl (Google's Native Client)

Post by _tommo_ »

I'm sorry if this has been brought up before (like my past question :P )... but I wanted to ask to someone really into it:
what's the state of NaCL adoption across other browsers, do they intend to support it at all? From what I got looking around, this wants to be a standard but as for now is a google-centric effort.
Also, without PNaCL you are required to build a version for each architecture, it would look like the next logical step... and looks really far away?
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games
Post Reply