Google

QtOgre Application Framework - Now using Qt 4.5

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!

Moderators: Moderators, OGRE Team

QtOgre Application Framework - Now using Qt 4.5

Postby PolyVox » Mon Nov 10, 2008 1:41 am

Hi guys,

This is a preview release of my new QtOgre framework. It is similar in concept to the ExampleApplication framework which comes with Ogre, but it is built on Qt and with a few more features. First, some screenshots:

Image

Image

And transparency in action:

Image

Its features include:
  • A configuration dialog:
    • Contains a 'Graphics configuration widget' to configure Ogre.
    • Support for rendering systems, resolution, etc.
    • All config settings stored to an .ini file
  • A log viewer:
    • Syntax highlighting and filtering
    • Qt's message handler are redirected to this system
    • Ogre's logs are also redirected
  • A Frames Per Second widget
    • Actaully a Qt Dialog
    • Window decorations turned off
    • Custom mouse handling so it can be dragged around
  • Simple to use interface:
    • Just inherit from 'GameLogic' class and override the desired functions
    • Demo is included which shows basic usage
    • Very few assumptions made so you have maximum flexibility
  • Support for transparent windows on some systems (Vista, Linux with Compviz)
Most importantly, it is very extensible. You can create your own widgets in Qt and add them to the window. You can create new logs and they appear with the rest. And you can define new 'settings' pages for your in-game configuration, these appear as tabs in the settings dialog.

When programming in this framework you naturally have access to the whole Qt API for tasks such as XML parsing, network support, sound support, etc.

You can download a prebuilt demo for windows here: http://www.david-williams.info/linked_f ... ebuilt.zip

And the Windows/Linux source code (under the liberal ZLib license) is available here: http://www.david-williams.info/linked_f ... Source.zip

The project is intended to form the basis for the next version of my Volumetric Game Engine. I will be porting this across over the next couple of weeks and will no doubt find places where the framework has to change, so please don't consider it final. There are also some missing features (such as some of the config options not actually doing anything).

However, I will keep this separate from my game engine so that it can be used by other interested people. I would also like to put it in Ogre Addons, if people feel this would be useful?

Let me know what you think!
Last edited by PolyVox on Tue Apr 14, 2009 10:21 pm, edited 4 times in total.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
 
Posts: 1174
Joined: Tue Nov 21, 2006 11:28 am
Location: Derby, UK

Postby Nauk » Mon Nov 10, 2008 1:57 am

Simply: Wow :)
User avatar
Nauk
Veteran
 
Posts: 492
Joined: Thu May 11, 2006 9:12 pm
Location: Sweden

Postby romulo » Mon Nov 10, 2008 1:58 am

Awesome work! Congratulations, it is a step further in multi plataform compatibility and acceptance. I would love to see now Qt Inside ogre! xD
User avatar
romulo
Regular
 
Posts: 83
Joined: Tue Jun 17, 2003 6:37 pm

Postby enligor » Mon Nov 10, 2008 2:19 am

That's just WOW :shock: ! Can't say enough how amazing and useful this addition is. Being a cross-platform engine, it makes sense for Ogre to have Qt or GTK+ with it (although my favourite has always been KDE/Qt)!
Thnx once more for you implementation!
Must say, the code is very nicely written, and runs very swiftly too. Shouldn't this (once it's finalized, of course) be included with the Ogre core?

P.S. actually, for the past few weeks this is something I was trying to write - a Qt framework for Ogre, but yours is way ahead of mine. So, thnx once more, and if I could help with anything, I'd be glad to. :wink:
User avatar
enligor
Regular
 
Posts: 58
Joined: Tue Oct 21, 2008 8:23 pm

Postby PolyVox » Mon Nov 10, 2008 11:13 am

Thanks guys! I'm glad you like it :)

romulo wrote:Awesome work! Congratulations, it is a step further in multi plataform compatibility and acceptance. I would love to see now Qt Inside ogre! xD


You mean like in this thread?

http://www.ogre3d.org/phpBB2/viewtopic.php?t=42733

Actually I never really got it to work. But my main aim in using that approach was to be able to use the transparent widgets, and it has proved to be much simpler to just let Vista/Compviz handle this. This probably means the transparency won't work on Windows XP (although I haven't tried it).

Incidentally, if you want to test transparency then just edit settings.ini and change the 'DefaultWindowOpacity' to something less than '1.0'.

enligor wrote:Must say, the code is very nicely written, and runs very swiftly too. Shouldn't this (once it's finalized, of course) be included with the Ogre core?


Thanks! It still needs some tidying but I think the design is pretty decent and easy to use. It won't go into Ogre core as we won't want to make Ogre dependant on Qt, but I think it could usefully go into Ogre Addons. I will contact someone about it.

I will aim to write a Wiki page on it as well.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
 
Posts: 1174
Joined: Tue Nov 21, 2006 11:28 am
Location: Derby, UK

Postby FrameFever » Mon Nov 10, 2008 11:44 am

why didn't you use qmake?
User avatar
FrameFever
Platinum Sponsor
Platinum Sponsor
 
Posts: 383
Joined: Fri Apr 27, 2007 10:05 am

Postby PolyVox » Mon Nov 10, 2008 12:17 pm

FrameFever wrote:why didn't you use qmake?


No real reason - I'm just using CMake for my game engine (which will soon be ported to this framework) so I know how it works. I expect it's possible to have both QMake and CMake scripts though, so if anyone wants to contribute one I'll happily add it. Or maybe I do it myself at some point...
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
 
Posts: 1174
Joined: Tue Nov 21, 2006 11:28 am
Location: Derby, UK

Postby Brocan » Mon Nov 10, 2008 1:09 pm

Woah! You did it! Congrats :D
User avatar
Brocan
Regular
 
Posts: 219
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!

Postby sinbad » Mon Nov 10, 2008 1:27 pm

Hey, really nice work. I'll happily give you a spot in ogreaddons (assuming the license is open source), please shoot me an email to organise.
User avatar
sinbad
OGRE Founder, Ex-Lead
OGRE Founder, Ex-Lead
 
Posts: 25646
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands

Postby iloseall » Mon Nov 10, 2008 3:02 pm

Great work! QT for framework,QT for UI.
:shock:
User avatar
iloseall
Regular
 
Posts: 157
Joined: Sun Sep 14, 2003 3:54 am
Location: Beijing China

Re: QtOgre Application Framework

Postby ppClarity » Mon Nov 10, 2008 4:49 pm

PolyVox wrote:And the Windows/Linux source code (under the liberal ZLib license) is available here: http://www.david-williams.info/linked_f ... Source.zip

ObWarning: Qt is dual licensed, GPL or their own commercial license. I would be very (pleasantly) surprised if you were able to negotiate something Zlib or even LGPL compatible.

http://doc.trolltech.com/4.4/opensourceedition.html
ppClarity
Regular
 
Posts: 160
Joined: Sat Sep 02, 2006 12:27 am

Postby jacmoe » Mon Nov 10, 2008 7:07 pm

You cannot release it other than GPL, I'm afraid.

I wouldn't use QT on Windows anyway.

This is just great looking, Polyvox! :)
/* when invited to a free lunch, you should not complain about the quality of the caviar */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, Fueled by Passion.
Ogre AppWizards - project wizards for Visual Studio and Code::Blocks.
User avatar
jacmoe
OGRE Moderator
OGRE Moderator
 
Posts: 17493
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark

Postby PolyVox » Mon Nov 10, 2008 7:59 pm

Regarding the licensing issue, my copy of Qt came with a file called GPL_EXCEPTION.txt which contains (among other things) the following:
Additional rights granted beyond the GPL (the "Exception").
.
.
.
A) Your Software is licensed under one of the following licenses:


License name Version(s)/Copyright Date
Academic Free License 2.0, 2.1, 3.0
Apache Software License 1.0 or 1.1
.
.
.
X11 License X11R6.6
Zlib/libpng License (as set forth in the addendum file) <========
Zope Public License 2.0, 2.1


So actually I don't think it's a problem. But let me know if you disagree, I don't actually mind using the GPL i was just trying to be less restrictive :)

@sinbad - A spot in Addons would be great, I will email you.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
 
Posts: 1174
Joined: Tue Nov 21, 2006 11:28 am
Location: Derby, UK

Postby Kerion » Mon Nov 10, 2008 8:22 pm

And thus you see why the GPL is considered bad by many open sourcers, it's incredibly viral. Discussion for another time, I'm sure...but it's bad when someone can't release their software under the license of their choosing because the GPL has "infected" their dependencies.
Kerion
Regular
 
Posts: 236
Joined: Wed Feb 05, 2003 5:49 am

Postby Paladi » Mon Nov 10, 2008 8:27 pm

As I said you before, very nice work!!

When I have time I will look closer to it.
Paladi
Familiar face
 
Posts: 31
Joined: Mon Nov 19, 2007 6:24 pm

Postby nikki » Mon Nov 10, 2008 9:12 pm

Wait a minute... You're saying that the Qt widgets are are shown 'inside' Ogre? So we can use it for in-game GUI?

Nice work! :)
User avatar
nikki
Veteran
 
Posts: 2654
Joined: Sat Sep 17, 2005 10:08 am
Location: Doha, Qatar.

Postby jacmoe » Mon Nov 10, 2008 9:18 pm

If you wish to use the Qt Open Source Edition, you must contribute all your source code to the open source community in accordance with the GPL or Qt Software's GPL Exception when your application is distributed.

Taken from here:
http://trolltech.com/products/appdev/licensing/licensing#qt-open-source-license
That means that you need to completely separate your engine from your tool!
If you intend to stay out of the GPL, of course. :wink:
/* when invited to a free lunch, you should not complain about the quality of the caviar */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, Fueled by Passion.
Ogre AppWizards - project wizards for Visual Studio and Code::Blocks.
User avatar
jacmoe
OGRE Moderator
OGRE Moderator
 
Posts: 17493
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark

Postby jacmoe » Mon Nov 10, 2008 9:25 pm

Software developed with the Qt Open Source Edition is always open source software, i.e. it can only be distributed under a open source software license. In particular, all the source code for all the modules your software is based on, regardless of whether they have been written by you or by others, must be open source software (because of the "viral" nature of the GPL). This is part of our commitment to the open source software community, and enables those who contribute to the open source software pool to do so without paying license fees.
/* when invited to a free lunch, you should not complain about the quality of the caviar */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, Fueled by Passion.
Ogre AppWizards - project wizards for Visual Studio and Code::Blocks.
User avatar
jacmoe
OGRE Moderator
OGRE Moderator
 
Posts: 17493
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark

Postby jacmoe » Mon Nov 10, 2008 9:30 pm

Right, I found it:
As a special exception, you have permission to link this program
with the FOO library and distribute executables, as long as you
follow the requirements of the GNU GPL in regard to all of the
software in the executable aside from FOO.


That's the QPL license for you. :wink:
/* when invited to a free lunch, you should not complain about the quality of the caviar */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, Fueled by Passion.
Ogre AppWizards - project wizards for Visual Studio and Code::Blocks.
User avatar
jacmoe
OGRE Moderator
OGRE Moderator
 
Posts: 17493
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark

Postby Nauk » Mon Nov 10, 2008 9:57 pm

so basically we are talking GPL with runtime exception like ETM?
User avatar
Nauk
Veteran
 
Posts: 492
Joined: Thu May 11, 2006 9:12 pm
Location: Sweden

Postby jacmoe » Mon Nov 10, 2008 10:24 pm

Well. No.
The way I read it is that you must opensource your QT powered applications, but not your own linked in code.
It is not viral in that sense.
But, closed source: no. :wink:

In that regard, it is not like GPL with the runtime exception.
/* when invited to a free lunch, you should not complain about the quality of the caviar */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, Fueled by Passion.
Ogre AppWizards - project wizards for Visual Studio and Code::Blocks.
User avatar
jacmoe
OGRE Moderator
OGRE Moderator
 
Posts: 17493
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark

Postby Nauk » Mon Nov 10, 2008 10:44 pm

understand, the other way around then :)
User avatar
Nauk
Veteran
 
Posts: 492
Joined: Thu May 11, 2006 9:12 pm
Location: Sweden

Postby PolyVox » Tue Nov 11, 2008 12:24 am

There is no need to worry - the ZLib license is significantly more liberal than the GPL while still being GPL compatible. You only need to worry about whether you satisfy Qt's license requirements. There are basically two options:

  1. You are using the open source version of Qt under the GPL (+ exceptions) license. In this case you have to release you code under the GPL, or one of the other licenses outlined in the exceptions file. You can still use my code, because it is GPL-compatable as stated here: http://www.gnu.org/philosophy/license-l ... leLicenses
  2. You have a commercial Qt license, allowing you to release your code under any license you wish. If you want to use my code you need to adhere the terms of the ZLib license, but that is very permissive and allows commercial use.


So basically, if you decide you want to use Qt for your product (and are happy with either its commercial or open source license) then you can probably use my code.

nikki wrote:Wait a minute... You're saying that the Qt widgets are are shown 'inside' Ogre? So we can use it for in-game GUI?


Almost. My original aim was to embed Qt widgets into Ogre, but it turned out to be much simpler to overlay the widgets on top of Ogre and let the desktop handle the compositing/transparency. But yes, you can use it for an in-game GUI. In fact I wrote it to be used as an in-game GUI for my volumetric game engine
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
 
Posts: 1174
Joined: Tue Nov 21, 2006 11:28 am
Location: Derby, UK

Postby d000hg » Tue Nov 11, 2008 9:17 am

When you guys say 'GPL' do you mean LGPL (like Ogre) or the full-blown GPL?
Wouldn't incorporating anything with full GPL into Ogre mean the whole thing becomes full GPL, and screw us all over?
d000hg
Familiar face
 
Posts: 34
Joined: Tue Sep 02, 2008 9:41 pm

Postby PolyVox » Tue Nov 11, 2008 10:07 am

d000hg wrote:When you guys say 'GPL' do you mean LGPL (like Ogre) or the full-blown GPL?
Wouldn't incorporating anything with full GPL into Ogre mean the whole thing becomes full GPL, and screw us all over?


Qt is dual-licensed. If you are writing open source software the you can use it under the terms of the GPL (or one of the licenses listed in the exceptions file). If you are writing closed sources software then you have to purchase a commercial license from Trolltech/Nokia.

However, this QtOrge project will never be incorporated into Ogre for the reason you state. Instead it simply builds on both Qt and Ogre to provide a framework using both of them.

This project is intended for people who are already happy with the Qt licensing terms, either because they don't mind the GPL, or because they have brought a commercial Qt license. In either case the ZLib license I have chosen is compatible.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
 
Posts: 1174
Joined: Tue Nov 21, 2006 11:28 am
Location: Derby, UK

Next

Return to Showcase

Who is online

Users browsing this forum: Gohla, MSN [Bot], TeaBag, Xavyiy and 4 guests