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!
Post Reply
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

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.

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?

Download

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 from Ogre Add-ons. The direct Subversion URL for this project is: https://ogreaddons.svn.sourceforge.net/ ... eFramework

Let me know what you think!
Last edited by PolyVox on Sun Aug 22, 2010 9:16 am, edited 5 times in total.
User avatar
romulo
Halfling
Posts: 82
Joined: Tue Jun 17, 2003 6:37 pm
Contact:

Post by romulo »

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
enligor
Halfling
Posts: 58
Joined: Tue Oct 21, 2008 8:23 pm

Post by enligor »

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
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

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
FrameFever
Platinum Sponsor
Platinum Sponsor
Posts: 414
Joined: Fri Apr 27, 2007 10:05 am

Post by FrameFever »

why didn't you use qmake?
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

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
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!
x 8

Post by Brocan »

Woah! You did it! Congrats :D
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 »

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
iloseall
Gremlin
Posts: 156
Joined: Sun Sep 14, 2003 3:54 am
Location: Beijing China
Contact:

Post by iloseall »

Great work! QT for framework,QT for UI.
:shock:
ppClarity
Gremlin
Posts: 194
Joined: Sat Sep 02, 2006 12:27 am
x 2

Re: QtOgre Application Framework

Post by ppClarity »

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
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

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

I wouldn't use QT on Windows anyway.

This is just great looking, Polyvox! :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

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.
Kerion
Goblin
Posts: 235
Joined: Wed Feb 05, 2003 5:49 am
Contact:

Post by Kerion »

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.
Paladi
Kobold
Posts: 32
Joined: Mon Nov 19, 2007 6:24 pm
x 1

Post by Paladi »

As I said you before, very nice work!!

When I have time I will look closer to it.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

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
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

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/li ... ce-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:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

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.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

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:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Nauk
Gnoll
Posts: 653
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
x 36
Contact:

Post by Nauk »

so basically we are talking GPL with runtime exception like ETM?
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

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.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Nauk
Gnoll
Posts: 653
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
x 36
Contact:

Post by Nauk »

understand, the other way around then :)
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

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
d000hg
Goblin
Posts: 257
Joined: Tue Sep 02, 2008 9:41 pm
x 1

Post by d000hg »

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?
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

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.
Post Reply