Question about Windowing and "viewports"

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
yikyak
Posts: 12
Joined: Tue Jan 13, 2004 1:54 am

Question about Windowing and "viewports"

Post by yikyak »

I played around with Irrlicht last year (on a windows system using Dev C++) and really liked it. I've been given a new project (Linux), and am wondering whether I can use Irrlicht in it easily.

I need to build a gui with various form elements and a 2D data representation in a viewport. A lot of the work for this has been done already. What would be really cool is if there could be a 3d data representation in a viewport, and I'm wondering whether it'd be possible to use Irrlicht for this.

Part of the problem is that Irrlicht handles its own windowing. Is there any easy way to embed the irrlicht output onto a screen component, so that it only comprises part of the GUI?

Everything I've toyed around with seems to suggest that this isn't possible, especially as the split-screen tutorial is directx only, and I need to use opengl. Can I use Irrlicht for this, or would it be better to use a straight 3D library, as opposed to a 'games library'? I'm only asking because Irrlicht is so damn easy to use and would save a lot of hassle. If not; has anyone any suggestions for a good C++ 3D api. I've had a look at OpenSceneGraph, but am not sure what else is out there.
joy
Posts: 124
Joined: Tue Apr 27, 2004 9:15 am
Location: Germany

Post by joy »

what do you mean with irrlicht output? I mean you got the right way with a viewport. That is some kind of a window where the 3D object are rendered into, so it takes only a little part of the screen. and every other 2d component you could just set into that part of the screen.
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

What I think you are looking for is some kind of ActiveX command that you could use in your existing project? In theory I guess it is possible but this is something you would have to write yourself, noone has tried it. I would have thought that it would be damn hard, you may have to build your existing app into Irrlicht rather than the other way around. Then you could set the viewport to only part of the screen and that would work.

It may well mean you rewriting your GUI to use the Irrlicht functions, it depends how much work you have done and are prepared to do.
mj
Posts: 1
Joined: Thu May 06, 2004 1:18 pm
Location: Russia

Post by mj »

It seems that you shoud consider using some separate 3d api....

Then consider Ogre! It can be multi-viewported and multi-windowed. And it is really easy to use.
--mj
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

That's true, OGRE is a far more mature and advanced engine that Irrlicht. It's not really easy to use however, nowhere near as easy as Irrlicht but for more advanced features it is king. Irrlicht will catch up one day I recon it just depends how long you are prepared to wait.
yikyak
Posts: 12
Joined: Tue Jan 13, 2004 1:54 am

Heh!

Post by yikyak »

No replies for a couple of days and then four come along at once... :D

When you use Irrlicht, or any glut-similar tech (NUI, GLOW, GLUI, GLT etc.) to create a gui, that gui is actually being rendered by OpenGL (or D3D on windows) - it's actually "fake" 2d - as it uses the same rendering pipeling and screen output as the 3D stuff - not using native widget-sets etc.

Tyn got what I meant. WxWindows, Qt, the Win API and the Fox Toolkit (all gui widget sets) all have components on which it's possible to "project" or "mount" OpenGL-rendered output, but embedded within the standard 2D gui-windowing environment. Think of the difference between the viewports and the GUI itself in 3DS max/Maya/Lightwave/Blender to see what I mean.

Of course, it's theoretically possible to do this with Irrlicht (glut uses the native widget sets); I was just wondering whether anyone had actually figured out an easy way to do it. I need to write an app for 3D data representation - not really a game :? - so was just checking to see if anyone had managed it.

I've been playing with Coin3d and Qt / Win API, and am probably going to use that instead (it's academic work so GPL isn't an issue). Don't get me wrong - I still love Irrlicht :wink: - it's just that it doesn't seem to be the solution to what I need to do. Shame though; because Irrlicht's simplicity would have saved some work (yeah - I'm being slack...).

Thanks anyway.
Unarekin
Posts: 60
Joined: Thu Apr 22, 2004 11:02 pm

Post by Unarekin »

I recall there being a thread about embedding Irrlicht in an SDI window via MSVC++. I believe it was in the Faqs forum, you could take a peek at that and see if it helps ya out any.
yikyak
Posts: 12
Joined: Tue Jan 13, 2004 1:54 am

Post by yikyak »

Cheers Unarekin; unfortunately it needs to run cross-platform (win and lin).

At some point I'll get round to figuring it out with Irrlicht, but time's a bit tight...
Unarekin
Posts: 60
Joined: Thu Apr 22, 2004 11:02 pm

Post by Unarekin »

yikyak wrote:Cheers Unarekin; unfortunately it needs to run cross-platform (win and lin)
Yeah, that could be problematic. I can't say for sure as I haven't looked at the project myself, but it might help provide some insight on how you could go around plugging Irrlicht into your own windowing method (Which you're obviously doing, otherwise this would be a non-issue).
Post Reply