NaviLibrary v1.5 Released

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2
Contact:

NaviLibrary v1.5 Released

Post by ajs15822 »

Howdy Ogre3D!

I'm very happy to announce the final release of NaviLibrary v1.5.

If you're new to NaviLibrary, it's basically a library that lets you write your GUI using HTML/CSS/Javascript. That's really just the tip of the iceberg-- for example, with NaviLibrary you could render web advertisements to a 3D billboard or even let your users interface with an online discussion board directly from within your game-- the possibilities are limited only by your imagination.

If you've used NaviLibrary before, I hope that you will find the new API much cleaner and more intuitive than the previous iteration.
  • Screenshot of NaviDemo v1.5 (click for larger):
    Image
Summary of changes:
API Changes since v1.4:
- In NaviManager:
-- NaviManager::GetPointer has been added
-- NaviManager::Startup has been merged into the constructor for NaviManager.
-- NaviManager::Shutdown no longer exists, just delete NaviManager instead.
-- You must instantiate (new NaviManager(renderWin)) NaviManager before accessing the singleton via NaviManager::Get/NaviManager::GetPointer.
-- NaviManager's constructor now also lets you specify the directory of your gecko runtime folders, this is by default 'GeckoRuntime'.
-- Massive refactoring of interface. Manipulation of Navis by name through NaviManager is no longer supported. NaviManager is now purely for the creation/destruction of Navis, global input injection, and methods that affect mass number of Navis. To manipulate individual Navis, you should obtain a direct pointer to a Navi from NaviManager and then manipulate it using the public interface of the Navi itself.
--- NaviManager::createNavi/createNaviMaterial return pointers to the Navis that are created.
--- NaviManager::createNavi/createNaviMaterial have lost several parameters
--- NaviManager::getNavi looks up a Navi by name and returns a pointer to the Navi; if the Navi is not found, returns 0.
--- NaviManager::StartupMouse and NaviManager::getMouse have been removed. The NaviMouse singleton should now be instantiated separately.
- In Navi:
-- Massive refactoring of interface, a plethora of member functions are now public.
-- Many of the methods for Navi manipulation that were previously only available through NaviManager have been refactored directly into Navi.
-- Most of the setter methods return a pointer to the Navi that it was invoked on to allow chaining of setters.
-- Navi::getExtents has been added
-- Navi::evaluateJS now has an optional second parameter (NaviUtilities::Args, a vector of variants) that lets you evaluate the Javascript as a template (use '?' as the pseudo-character, strings will automatically be quoted).
- In NaviMouse:
-- Is now a true singleton. You must instantiate it (new NaviMouse()) before accessing it via NaviMouse::Get/GetPointer.
-- It's constructor now takes two new, initial arguments: width and height.
-- It's destructor is now private-- the destructor of NaviManager destroys NaviMouse
-- NaviCursor::getName has been added
- In NaviUtilities:
-- NaviUtilities::limit has been added. It is a simple, templated helper that limits a number between two numbers.
-- NaviUtilities::MultiValue is a new variant class (formerly NaviDataValue)
-- NaviUtilities::Args is a new InlineVector, similar to NaviUtilities::Strings, but can take several different types (MultiValue).
-- NaviUtilities::stringTemplate and logTemplate have been added.
- In NaviEventListener:
-- Has been modified considerably, two more events have been added. Parameters have been modified (now each event passes a pointer to the calling Navi instead of the name), onNaviLinkClicked has been renamed to onLinkClicked.
- In NaviDemo:
-- Has been greatly modified to use the new interface scheme. Look to it for suggestions on how to implement the new changes.
- In the VC8 Solution:
-- Two new configurations: Release DLL and Debug DLL. If you intend to use these configurations, you must link to 'Navi_DLL.lib' (use 'Navi_d_DLL.lib' for debug), and copy 'Navi.dll' (use 'Navi_d.dll' for debug) to your application's working directory.
- In the dependencies and file-system:
-- The Gecko runtime folders (components, res, chrome, etc.) have now been wrapped by a 'GeckoRuntime' folder. See the NaviManager constructor to change this runtime directory.
-- LLMozLib has been modified so that it does not limit the max number of browser windows
-- There was a bug in LLMozLib with sending update notification events to Navi when the window handle (HWND) a browser window was created with was not the top-level window. This obviously created some problems with embedding NaviLibrary inside of an external GUI (such as wxWidgets). This bug has been squashed thanks to the efforts of Pagghiu (details of the changes can be found on the wiki as LLMozLib_ChildWindow_Patch).

Core Changes since v1.4:
- New template class 'NaviLibrary::Singleton' has been created to make the NaviManager Singleton safer and more manageable. It is mostly a carbon-copy of Ogre's Singleton except with different accessors (Singleton::Get()/Singleton::GetPointer()) and verbose exceptions.
- DLL support!
- Much of the code in Navi, NaviManager, and NaviMouse has been refactored/simplified.
- NaviMouse now supports arbitrary widths/heights of cursors
- NaviDemo has been refactored, the debug overlay has been minimized, and the scene has been changed up.

Bugfixes since v1.4:
- Textures loaded from an image refuse to give up their data via read-only locks in OpenGL-mode in Ogre3D. (Thus, Navis with masks would be invisible in OpenGL). A workaround has been applied.
- NaviMouse now properly restores its internal texture when it has been lost (usually after a window resize).
- Several VC7 incompatibilities have been resolved under the guidance of g6r6e6g.
- A texture corruption bug with NaviMouse has been corrected thanks to g6r6e6g.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Post by Klaim »

Well done and Thanks! :D
marshmonkey
Goblin
Posts: 251
Joined: Thu May 31, 2007 5:41 am

Post by marshmonkey »

great work AJ! Navi fan club represent!
http://NimbleBit.com <- purveyors of nimble bits
http://myZeroGear.com <- mah indie game
Murphy
Greenskin
Posts: 102
Joined: Tue May 10, 2005 11:42 pm
Location: SF, California
Contact:

Post by Murphy »

We are using Navi extensively in Zero Gear http://nimblebit.blogspot.com/ and I can't recommend it enough Ogre developers!

Below are a couple of in development GUIs. This was done by my artist in Dreamweaver and I simply hooked up the events from the JavaScript to my application. I only had to touch about 10% of the code related to this GUI in the end.

Image

And a video of it in action!
http://www.vimeo.com/448510
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Really nice, well done!
User avatar
xadhoom
Minaton
Posts: 973
Joined: Fri Dec 28, 2007 4:35 pm
Location: Germany
x 1

Post by xadhoom »

Very good! I´ll take a look! :P
User avatar
chmod
Greenskin
Posts: 131
Joined: Tue Feb 25, 2003 10:33 pm
Location: Seattle, Washington USA

Post by chmod »

nice work, ajs. I've been using Navi since you first announced it, and I really love the recent interface changes you've made. Much more OO :)

Now get to work convincing mozilla to fix that crash on exit in debug mode!
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2
Contact:

Post by ajs15822 »

chmod wrote:nice work, ajs. I've been using Navi since you first announced it, and I really love the recent interface changes you've made. Much more OO :)

Now get to work convincing mozilla to fix that crash on exit in debug mode!
I'm glad to have your patronage. :D

Mozilla fixed that bug a little while back but, alas, XULRunner 1.9 has still not made an official release yet.

If you don't want to see any of Mozilla's debug assertions anymore, just follow these steps:
AjS15822 wrote:You can actually disable the display of the assertion dialog by setting an environment variable:
  1. Go to your Control Panel
  2. Open up 'System'
  3. Select the 'Advanced' tab
  4. Click 'Environment Variables'
  5. Click 'New' in the 'System Variables' box
  6. Enter the following information:
    • Variable name: XPCOM_DEBUG_BREAK
    • Variable value: warn
dudeabot
Gnome
Posts: 334
Joined: Thu Jun 28, 2007 2:12 pm
Location: Brazil
x 5
Contact:

Post by dudeabot »

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 3
Contact:

Post by Falagard »

ajs15822 wrote:Hum, the only modifications I have made to LLMozLib is upgrading it to VC8 and my JS_Eval patch (and also a minor max-window limit removal and fix for a rare bug-- but both of those additions are irrelevant to your problem).

Maybe you're using a different build of LLMozLib/XULRunner-- Navi uses llmozlib_win_src_2006_11_06 + mozilla 1.8.1. To get it to build on VC8, I just followed HiddenBek's instructions.

I've had a lot of requests lately for the exact LLMozLib source + Mozilla XULRunner dependencies that Navi comes pre-compiled with so I decided I would release it for the good of mankind. So here, you get first taste; if you got MSVC8, it should be as simple as opening the solution and hitting build.

P.S., please direct further replies to the more recent NaviLibrary thread. :P
Ok, thanks for this info. I'll look into using Mozilla 1.8.1 - I used FIREFOX_2_0_RELEASE revision because a build.txt file that comes with LLMozLib said to use that revision, but maybe I'll use MOZILLA_1_8_1_RELEASE revision. Does that sound right?

Anyhow, if you can get it to build properly following HiddenBek's instructions hopefully I'll have the same luck so I'll give it another shot. I'm using Visual Studio 7.1 and can't upgrade for this particular project so hopefully it's not a particular problem with the VS7.1 build.

Thanks, and you should add this to the Navi wiki.
User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 3
Contact:

Post by Falagard »

I'm now trying to get this to compile with Visual Studio 2005 instead of 2003. A couple questions:

Did you install MozillaBuild or are you using cygwin?

"-Follow the normal process until you've got mozilla checked out and
patched, and have created .mozconfig from the .mozconfig.optimized
file. "

The normal process - are you using MozillaBuild's process of running start-msvc8.bat which then gives you a MingW32 command prompt and do everything from there, or are you doing something else, such as doing it from a windows command prompt?

Using gmake or make?

Banging my head against a wall here ;-)
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2
Contact:

Post by ajs15822 »

It's been a while since I last built Mozilla from source, but it went a little something like this:
  • - Download and unpack the MozillaBuild utility to C:\MozillaBuild
    - Run start-msvc8.bat
    - Follow the general commands in build.txt (should be in your build_mozilla dir of LLMozLib src) to checkout and build Mozilla (if you need more help, go here)
    - When you hit the errors while running make, follow HiddenBek's directions
Metron
Gnoblar
Posts: 5
Joined: Sat Apr 16, 2005 7:54 am
Contact:

Post by Metron »

Hi,

is there any chance to get the whole lib as a VS2008 project with the dependencies compiled accordingly? I've tried to compile the sources with VS2008 and was successful but unfortunately it seems that either the embedded manifest or the dependency on llmozlib creates some problems.

Once you try to start the app, it requests the msvcrt80d.dll (if in debug) which is not found. Putting it manually into the folder leads to other problems.

Would be great to have a VS2008 version of it. I've chosen this lib due to the fact that you can use any html page for your gui...

Thanks,
Metron
Rambus
Greenskin
Posts: 100
Joined: Tue Aug 01, 2006 6:50 am
Location: Canada
x 6
Contact:

Post by Rambus »

I was undecided on using Navi for an up coming project. But I must say after tinkering with Navi for about a day I'm awe struck at how fast I can create beautiful, interactive gui's. This is simply a great project.

I'll be sure to post some Navi screen shots as my project progresses.

Keep up the good work.
dfjimenezt
Gnoblar
Posts: 4
Joined: Mon Nov 26, 2007 6:25 am

Post by dfjimenezt »

Hi, I've just compiled Navi, everything was ok, the navyDemo Runs fine but when I try to get it in my app, I get something like this

Image

I've tried, with a lot of html files.

Code: Select all

 
naviMgr = new NaviManager(renderWin, "..\\media");
Navi* helloNavi = naviMgr->createNavi("helloNavi", "http://navi.agelessanime.com/chat/index.html", NaviPosition(Center), 400, 320);
Navi* hello = naviMgr->createNaviMaterial("materialnavi","local://hello.html",400,320,Ogre::FO_ANISOTROPIC);
ogreHead->setMaterialName("materialnavi");

Code: Select all

Navi* helloNavi = naviMgr->createNavi("helloNavi", "local//helloworld.html", NaviPosition(Center), 400, 320);
all of these render the same

I thought it was about

Code: Select all

naviMgr->Update();
I started a totally new app, from an empty project, but I got the same result :(
dudeabot
Gnome
Posts: 334
Joined: Thu Jun 28, 2007 2:12 pm
Location: Brazil
x 5
Contact:

Post by dudeabot »

did you copy all folders (chorme, componentes, etc)?
dfjimenezt
Gnoblar
Posts: 4
Joined: Mon Nov 26, 2007 6:25 am

Post by dfjimenezt »

Yes, I did copy the GeckoRuntime both release and debug version from llmozlib directory in my release/debug directory.

I also tried with the GeckoRuntime directory from NaviDemo

:(
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2
Contact:

Post by ajs15822 »

Hum, if the NaviDemo is working for you-- that means your videocard can certainly handle NaviLibrary.

So it must be something you're doing. :D

Let's see, so you're calling NaviManager::Update regularly, good good. Your Navi creation code checks out; though, you might wanna double check that hello.html exists in the 'media' directory that resides one level up from your app's working directory-- but as it seems you're having the same trouble with a remote link on your NaviMaterial, that might not be the issue.

Hmmm, are you pumping window messages? It could be that Navi is not being notified of page changes and so is not updating the texture past the default white page. If you're not using the Ogre Framelistener thingie, you should have this in your update loop.

Code: Select all

Ogre::WindowEventUtilities::messagePump();
If the problem still persists after even that, you could try overriding auto-updates to see if that isolates the problem:

Code: Select all

helloNavi->setForceMaxUpdate(true);
hello->setForceMaxUpdate(true);
User avatar
chmod
Greenskin
Posts: 131
Joined: Tue Feb 25, 2003 10:33 pm
Location: Seattle, Washington USA

Post by chmod »

that second snippet of creation code is missing a colon after local.

Code: Select all

Navi* helloNavi = naviMgr->createNavi("helloNavi", "local//helloworld.html", NaviPosition(Center), 400, 320);
should be

Code: Select all

Navi* helloNavi = naviMgr->createNavi("helloNavi", "local://helloworld.html", NaviPosition(Center), 400, 320);
dfjimenezt
Gnoblar
Posts: 4
Joined: Mon Nov 26, 2007 6:25 am

Post by dfjimenezt »

ok, thnks all

I noticed that when I render in fullscreen the navi works very good

Image

In windowed mode

keeps rendering nothing neither with setForceMaxUpdate(true);


my pc is a notebook Dell XPS M1210
my videocard Nvidia GeForce Go 7400[/img]
User avatar
Telamon
Kobold
Posts: 26
Joined: Mon Feb 28, 2005 9:34 am
x 1
Contact:

Demo crashes

Post by Telamon »

The demo crashes for me. The .log file looks ok:

15:21:34: Creating resource group General
15:21:34: Creating resource group Internal
15:21:34: Creating resource group Autodetect
15:21:34: SceneManagerFactory for type 'DefaultSceneManager' registered.
15:21:34: Registering ResourceManager for type Material
15:21:34: Registering ResourceManager for type Mesh
15:21:34: Registering ResourceManager for type Skeleton
15:21:34: MovableObjectFactory for type 'ParticleSystem' registered.
15:21:34: OverlayElementFactory for type Panel registered.
15:21:34: OverlayElementFactory for type BorderPanel registered.
15:21:34: OverlayElementFactory for type TextArea registered.
15:21:34: Registering ResourceManager for type Font
15:21:34: ArchiveFactory for archive type FileSystem registered.
15:21:34: ArchiveFactory for archive type Zip registered.
15:21:34: FreeImage version: 3.9.2
15:21:34: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
15:21:34: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi
15:21:34: DDS codec registering
15:21:34: Registering ResourceManager for type HighLevelGpuProgram
15:21:34: Registering ResourceManager for type Compositor
15:21:34: MovableObjectFactory for type 'Entity' registered.
15:21:34: MovableObjectFactory for type 'Light' registered.
15:21:34: MovableObjectFactory for type 'BillboardSet' registered.
15:21:34: MovableObjectFactory for type 'ManualObject' registered.
15:21:34: MovableObjectFactory for type 'BillboardChain' registered.
15:21:34: MovableObjectFactory for type 'RibbonTrail' registered.
15:21:34: Loading library .\RenderSystem_Direct3D9
15:21:34: Installing plugin: D3D9 RenderSystem
15:21:34: D3D9 : Direct3D9 Rendering Subsystem created.
15:21:34: D3D9: Driver Detection Starts
15:21:34: D3D9: Driver Detection Ends
15:21:34: Plugin successfully installed
15:21:34: Loading library .\RenderSystem_GL
15:21:34: Installing plugin: GL RenderSystem
15:21:34: OpenGL Rendering Subsystem created.

I'm on Windows XP
Geforce 6800 Ultra

- - -

I'm very interested in using Navi in my project. Is there any chance it will work for me if I build it myself? What is the minimum hardware spec on using Navi?

I don't like downloading the source for open source projects because it always involves fetching a million dependencies and building those, and they never compile out of the box.

Can I just use the binaries shipped in the demo? Supplying windows binaries on your site would be awesome (you have no idea how awesome)
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2
Contact:

Post by ajs15822 »

dfjimenezt wrote:ok, thnks all

I noticed that when I render in fullscreen the navi works very good

...

In windowed mode

keeps rendering nothing neither with setForceMaxUpdate(true);


my pc is a notebook Dell XPS M1210
my videocard Nvidia GeForce Go 7400[/img]
That's really odd, I can't think of any reason why it would work in fullscreen versus windowed mode. Are the results the same in both render systems (DX/OGL)?
Telamon wrote:I'm very interested in using Navi in my project. Is there any chance it will work for me if I build it myself? What is the minimum hardware spec on using Navi?

I don't like downloading the source for open source projects because it always involves fetching a million dependencies and building those, and they never compile out of the box.

Can I just use the binaries shipped in the demo? Supplying windows binaries on your site would be awesome (you have no idea how awesome)
Can you be a little more verbose about the crash? Surely, that's not your entire log, is it?

Also, I haven't supplied binaries for NaviLibrary because it really is incredibly easy to build. All dependencies are included, all you need is the Ogre SDK installed to build. Just follow the tutorial "Building from Source" (it has pretty pictures!).
dfjimenezt
Gnoblar
Posts: 4
Joined: Mon Nov 26, 2007 6:25 am

Post by dfjimenezt »

Ok OpenGL works fine, in windowed mode... my only problem is about DirectX in windowed mode

regards
User avatar
Night Elf
Halfling
Posts: 96
Joined: Sun Jun 26, 2005 5:25 pm
Location: Argentina
Contact:

Post by Night Elf »

Hi, I'm trying to build Navi using Visual Studio 2008. I got the release version to compile, but the debug DLL version refuses to link with these errors:

Code: Select all

Linking...
   Creating library c:\Libs\NaviLibrary\Navi\Lib\Navi_d_DLL.lib and object c:\Libs\NaviLibrary\Navi\Lib\Navi_d_DLL.exp
llmozlib_d.lib(llmozlib.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Tmap_traits,class std::allocator >,0>::~_Tmap_traits,class std::allocator >,0>(void)" (??1?$_Tmap_traits@HPAVLLEmbeddedBrowserWindow@@U?$less@H@std@@V?$allocator@U?$pair@$$CBHPAVLLEmbeddedBrowserWindow@@@std@@@3@$0A@@std@@QAE@XZ)
llmozlib_d.lib(llembeddedbrowserwindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
llmozlib_d.lib(llmozlib.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Tmap_traits,class std::allocator >,0>::_Tmap_traits,class std::allocator >,0>(struct std::less)" (??0?$_Tmap_traits@HPAVLLEmbeddedBrowserWindow@@U?$less@H@std@@V?$allocator@U?$pair@$$CBHPAVLLEmbeddedBrowserWindow@@@std@@@3@$0A@@std@@QAE@U?$less@H@1@@Z)
llmozlib_d.lib(llembeddedbrowserwindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
c:\Libs\NaviLibrary\Navi\Lib\Navi_d.dll : fatal error LNK1120: 2 unresolved externals
The non-DLL debug version builds ok too. Please help me!
Mariano Ruggiero // Follow me on Twitter (@ArtCoder) // Check out our games:
NEW! Elemental Rage - metroidvania-style adventure platformer
Silent Swords // Silent Swords ZERO // Crunchy Planets
Post Reply