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:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

Ok, thanks, I have made these changes. You might want to check them as the patch wouldn't apply (I don't understand why - it just said error at line 5) so I did it manually.

It's nice to know that someone is keeping up to date with this project. Updates are pretty infrequent but I'm working on some interesting scripting stuff :-)
User avatar
milliams
Gremlin
Posts: 172
Joined: Fri Feb 16, 2007 1:47 am
Location: Portsmouth, UK
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by milliams »

PolyVox wrote:Ok, thanks, I have made these changes. You might want to check them as the patch wouldn't apply (I don't understand why - it just said error at line 5) so I did it manually.
It's probably because I'd already fixed one of two errors and so some of the patch became invalid.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

milliams wrote:
PolyVox wrote:Ok, thanks, I have made these changes. You might want to check them as the patch wouldn't apply (I don't understand why - it just said error at line 5) so I did it manually.
It's probably because I'd already fixed one of two errors and so some of the patch became invalid.
Maybe... but I'd just have expected SVN to flag conflicts in that case. Strange, but not too important.
dermont
Bugbear
Posts: 812
Joined: Thu Dec 09, 2004 2:51 am
x 42

Re: QtOgre Application Framework - Now using Qt 4.5

Post by dermont »

PolyVox wrote:
milliams wrote:
PolyVox wrote:Ok, thanks, I have made these changes. You might want to check them as the patch wouldn't apply (I don't understand why - it just said error at line 5) so I did it manually.
It's probably because I'd already fixed one of two errors and so some of the patch became invalid.
Maybe... but I'd just have expected SVN to flag conflicts in that case. Strange, but not too important.
Probably my fault, pasting text from gedit introduces additonal lines in the code block tags which I tried to manually remove.

You probably also need to update your CMake/Demos build for the Linux plugins*.cfg files (as per the EngineTest).
The Demo/CMakeLists.txt / plugings*.in template files appear to set up for Windows only.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

dermont wrote:You probably also need to update your CMake/Demos build for the Linux plugins*.cfg files (as per the EngineTest).
The Demo/CMakeLists.txt / plugings*.in template files appear to set up for Windows only.
Yep, thanks. I've fixed that :-)
User avatar
harr999y
Kobold
Posts: 29
Joined: Thu Mar 25, 2010 3:40 pm
Location: Dalian,China

Re: QtOgre Application Framework - Now using Qt 4.5

Post by harr999y »

So wonderful!I love it :P
But where is the newest donwload adress,i can't find it.Can you point it?Thanks :)
Harry
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

Thanks! 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

I've also added this information to my first post.
RenCheng
Gnoblar
Posts: 16
Joined: Thu Jan 03, 2008 1:42 pm

Re: QtOgre Application Framework - Now using Qt 4.5

Post by RenCheng »

I would recommend

Code: Select all

mFPSDialog = new FPSDialog(mOgreWidget, Qt::ToolTip);

rather than

Code: Select all

mFPSDialog = new FPSDialog(mOgreWidget, Qt::FramelessWindowHint);
so that the FPS dialog will not get the window focus automatically.
v_i_p
Gnoblar
Posts: 1
Joined: Wed Sep 01, 2010 2:26 pm

Re: QtOgre Application Framework - Now using Qt 4.5

Post by v_i_p »

Hi,

I cant run your demo application. When running, it gets an exception, then debugger points to "iosfwd" file to this row:


"_CRT_SECURE_MEMCPY(_First1, _Size_in_bytes, _First2, _Count);"

Then program output is:

"First-chance exception at 0x78544673 in Demo.exe: 0xC0000005: Access violation reading location 0x00f33000.
Unhandled exception at 0x78544673 in Demo.exe: 0xC0000005: Access violation reading location 0x00f33000.
The program '[1476] Demo.exe: Native' has exited with code 0 (0x0).
"


any help is appreciated.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

RenCheng wrote:I would recommend

Code: Select all

mFPSDialog = new FPSDialog(mOgreWidget, Qt::ToolTip);

rather than

Code: Select all

mFPSDialog = new FPSDialog(mOgreWidget, Qt::FramelessWindowHint);
so that the FPS dialog will not get the window focus automatically.
Ok, that doesn't seem to do any harm so I've commited it. Longer term I need to do a bit of a rewrite here, a it's a bit silly that you can drag the main window away from under the FPS widget.
v_i_p wrote:Hi,

I cant run your demo application. When running, it gets an exception, then debugger points to "iosfwd" file to this row:
.
.
.
any help is appreciated.
Hard to say from what you posted... can you also post the call stack? You might also want to break when exceptions are thrown via Debug->Exceptions->Check all the boxes. And is there anything in the log files (search for *.html files)?
RenCheng
Gnoblar
Posts: 16
Joined: Thu Jan 03, 2008 1:42 pm

Re: QtOgre Application Framework - Now using Qt 4.5

Post by RenCheng »

PolyVox wrote:
RenCheng wrote:I would recommend

Code: Select all

mFPSDialog = new FPSDialog(mOgreWidget, Qt::ToolTip);

rather than

Code: Select all

mFPSDialog = new FPSDialog(mOgreWidget, Qt::FramelessWindowHint);
so that the FPS dialog will not get the window focus automatically.
Ok, that doesn't seem to do any harm so I've commited it. Longer term I need to do a bit of a rewrite here, a it's a bit silly that you can drag the main window away from under the FPS widget.
And another problem about FPS window is that in fullscreen mode, the FPS window cannot been seen:)
User avatar
JamesKilton
Halfling
Posts: 87
Joined: Tue Jun 14, 2005 8:21 pm
x 1

Re: QtOgre Application Framework - Now using Qt 4.5

Post by JamesKilton »

Just a heads up, I got this working on Qt 4.6 under Snow Leopard with the following changes (ignore the setAttribute lines, was me playing around with things):

http://github.com/jameskilton/slartibar ... 27c#diff-2
Ogre.rb Project Lead
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

Thanks, I've added those changes to SVN.
pra
Halfling
Posts: 55
Joined: Sat Jul 15, 2006 4:03 pm
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by pra »

Sometimes (usually when there was a window over the ogrewidget) only parts of it are actually rendering stuff:
Image

It stays this way until I move or resize the window. I suppose I can do something to fix this, but I have no idea what. For testing, I connected a debug function to an action with a hotkey.
I tried:
- mOgreWidget->update();
- mOgreWidget->repaint();
- mOgreWidget->m_pOgreRenderWindow->update();
- mOgreWidget->m_pOgreRenderWindow->windowMovedOrResized();

nothing works.

Ogre: 1.7.1 SDK
Qt: 2010.02.1
QtOgre: just updated from SVN
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

Strange, I've not seen that. Has it stopped updating, or is it still updating but only for that part? What happens if you had an animated object under that part of the view or if you look around with the mouse? Sorry I can't be more helpful!
pra
Halfling
Posts: 55
Joined: Sat Jul 15, 2006 4:03 pm
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by pra »

No, it keeps updating, but only in this part. When I look around with the mouse, the view changes accordingly, but again only in this part.

And now I might have an idea. My OgreWidget is in a MdiSubWindow, so could it be that the subwindow thinks it is in no need to redraw? If yes, can I somehow disable this behaviour without connecting a lot of stuff to the subwindow?
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

Ah, so you are reusing the QtOgreWidget but not the whole QtOgre Application Framework? I can't say I've tried it with MDI windows though so I can't help much there. I guess the Ogre Viewport is being set incorrectly? Can you set a breakpoint somewhere to verify? Or just try priniting out the viewport values each time you draw a frame?
pra
Halfling
Posts: 55
Joined: Sat Jul 15, 2006 4:03 pm
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by pra »

Yes, I decided to use a MainWindow with an mdiArea, with everything necessary inside it (I don't like the Gimp approach to stuff like this).
Well, which values might help? Also, I have no idea how and where to set the breakpoint, since the window is being "cleaned" by anything in front of it (so changing into VC++ and then back will definitely break the error).
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

pra wrote:Well, which values might help?
Probably left, top, height, and width, which according to the ogre docs should be 0,0,1,1 in order to fill the window. Have a look here. But I'm really guessing here and in someways it doesn't feel like a viewport problem. Maybe also check the window flags which you are using as maybe they need to be differnt for MDI in order to allow proper repainting?
pra wrote:Also, I have no idea how and where to set the breakpoint, since the window is being "cleaned" by anything in front of it (so changing into VC++ and then back will definitely break the error).
Good point, I guess you are just stuck with printing debug messages.
pra
Halfling
Posts: 55
Joined: Sat Jul 15, 2006 4:03 pm
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by pra »

the position and size of the window stays constant.
I also looked through the Qt documentation and found stuff like the attribute
Qt::WA_OpaquePaintEvent:
Indicates that the widget paints all its pixels when it receives a paint event. It is thus not required for operations like updating, resizing, scrolling and focus changes to call erase the widget before generating paint events. Using WA_OpaquePaintEvent is a small optimization. It can help to reduce flicker on systems that do not provide double buffer support, and it avoids the computational cycles necessary to erase the background prior to paint. Note: Unlike WA_NoSystemBackground, WA_OpaquePaintEvent makes an effort to avoid transparent window backgrounds. This is set/cleared by the widget's author.
I Tried setting it to both the orge widget itself and the mdiSubWindow, no effect. Or almost no effect. Usually, the error occures when I open a level from the main menu (the app this stuff is part of is an editor), and this rectangle is where the "open level" dialog has been. So, when I set this attribute, the first time I open a level, the render window is redrawn like it should, but after that everything is back to "normal".


edit: it's really like Qt would save the current stuff displayed on the ogre widget, then just use this screenshot instead of displaying it's actual contents, unless it actually has to redraw parts of it, because there has been something in front of it which is not part of the window.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

Don't have time to write much as i'm at the airport, but as you are only using the OgreWidget part of my framework it might be worth looking at a couple of alternatives to see if they have the same problem. I think there is some Qt code in the ogre wiki and the Ogitor editor also has one. Maybe you can compare them with mine if they work in mdi mode?
User avatar
mboeni
Halfling
Posts: 54
Joined: Mon Aug 02, 2010 10:32 pm
Location: Zurich, Switzerland
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by mboeni »

Hi all

Is there a tutorial / guidance documentation on how to use the QtOgreFramework? I have successfully built the libs (from ogreaddons svn) and now look for the next step :)

Cheers,
michael
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

I'm afraid there's no real documentation, but the 'Demo' project in SVN is pretty straight forward to understand (not 'EngineTest', which is a bit more complex). Just ask here is you have any specific questions.
User avatar
mboeni
Halfling
Posts: 54
Joined: Mon Aug 02, 2010 10:32 pm
Location: Zurich, Switzerland
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by mboeni »

Hi there

Okay, I looked at the Demo and tried to itroduce a "stripped down" version to my system, and go from there.

Currently, I have the following two files included:

OgreEngineLogic.h (based on your DemoGameLogic.h)

Code: Select all

#ifndef OGREENGINELOGIC_H_
#define OGREENGINELOGIC_H_

//#include "ChooseMeshWidget.h"
#include "GameLogic.h"
//#include "MainMenu.h"

#include <OgrePrerequisites.h>

#include <qhash.h>
#include <qpoint.h>
#include <QTime>

namespace QtOgre
{
	enum KeyStates
	{
		KS_RELEASED,
		KS_PRESSED
	};
	
	class StyleSettingsWidget;
	
	class OgreEngineLogic : public GameLogic
	{
	public:
		OgreEngineLogic(void);

		void initialise(void);
		void update(void);
		void shutdown(void);

		void onKeyPress(QKeyEvent* event);
		void onKeyRelease(QKeyEvent* event);

		void onMouseMove(QMouseEvent* event);
		void onMousePress(QMouseEvent* event);

		void onWheel(QWheelEvent* event);

//		QtOgre::Log* demoLog(void);
		
		void loadScene(QString filename);

	private:
		QHash<int, KeyStates> mKeyStates;
		QPoint mLastFrameMousePos;
		QPoint mCurrentMousePos;

		int mLastFrameWheelPos;
		int mCurrentWheelPos;
		QTime* mTime;

		int mLastFrameTime;
		int mCurrentTime;

		bool mIsFirstFrame;

		float mCameraSpeed;

		//ChooseMeshWidget* mChooseMeshWidget;
		//MainMenu* mMainMenu;
		
		StyleSettingsWidget* mStyleSettingsWidget;

		Ogre::Camera* mCamera;
		Ogre::SceneManager* mSceneManager;
//		QtOgre::Log* mDemoLog;
	};
}
#endif /*OGREENGINELOGIC_H_*/
and OgreEngineLogic.cpp (based on your implementation):

Code: Select all

#include "OgreEngineLogic.h"
#include "DotSceneHandler.h"
//#include "MainMenu.h"
//#include "LogManager.h"
#include "OgreWidget.h"
//#include "StyleSettingsWidget.h"

#include <OgreEntity.h>
#include <OgreRenderWindow.h>
#include <OgreResourceGroupManager.h>
#include <OgreRoot.h>

#include <QKeyEvent>
#include <QMouseEvent>
#include <QSettings>

namespace QtOgre
{
	OgreEngineLogic::OgreEngineLogic(void)
		:GameLogic()
	{
	}

	void OgreEngineLogic::initialise(void)
	{
		//qApp->setStyleSheet(qApp->settings()->value("UI/StyleFile").toString());
		
		//mDemoLog = mApplication->createLog("Demo");

		//mApplication->showLogManager();
/*
		mDemoLog->logMessage("A demonstration debug message", LL_DEBUG);
		mDemoLog->logMessage("A demonstration info message", LL_INFO);
		mDemoLog->logMessage("A demonstration warning message", LL_WARNING);
		mDemoLog->logMessage("A demonstration error message", LL_ERROR);*/

		//Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();

		// Create the generic scene manager
		mSceneManager = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC, "GenericSceneManager");

		//Set up scene
		loadScene("media/scenes/test.scene");

		mApplication->ogreRenderWindow()->addViewport(mCamera)->setBackgroundColour(Ogre::ColourValue::Black);

		mSceneManager->setAmbientLight( Ogre::ColourValue( 1, 1, 1 ) );

		//Create the MainMenu
	/*	mMainMenu = new MainMenu(qApp, qApp->mainWidget());*/

		//Create widget to choose between models
		//mChooseMeshWidget = new ChooseMeshWidget(mJaiquaEntity, mRobotEntity, qApp->mainWidget());
		//mChooseMeshWidget->setWindowOpacity(qApp->settings()->value("System/DefaultWindowOpacity", 1.0).toDouble());
		//mChooseMeshWidget->move(qApp->mainWidget()->geometry().left() + qApp->mainWidget()->geometry().width() - mChooseMeshWidget->frameGeometry().width() - 10, qApp->mainWidget()->geometry().top() + 10);
		//mChooseMeshWidget->show();

		mTime = new QTime;
		mTime->start();

		mIsFirstFrame = true;

		mCameraSpeed = 10.0;

		

		for (Ogre::SceneManager::MovableObjectIterator moi = mSceneManager->getMovableObjectIterator("Entity"); moi.hasMoreElements(); moi.moveNext())
		{
			Ogre::Entity *entity = static_cast<Ogre::Entity*>(moi.peekNextValue());

			Ogre::AnimationStateSet* animationStateSet = entity->getAllAnimationStates();		
			if(animationStateSet && animationStateSet->hasAnimationState("Walk"))
			{
				Ogre::AnimationState* walkAnimationState = animationStateSet->getAnimationState("Walk");
				walkAnimationState->setLoop(true);
				walkAnimationState->setEnabled(true);
			}
		}

		//mApplication->showFPSCounter();
		//
		//mStyleSettingsWidget = new StyleSettingsWidget;
		//mApplication->addSettingsWidget("Style", mStyleSettingsWidget);
	}

	void OgreEngineLogic::update(void)
	{
		mLastFrameTime = mCurrentTime;
		mCurrentTime = mTime->elapsed();

		float timeElapsedInSeconds = (mCurrentTime - mLastFrameTime) / 1000.0f;

		for (Ogre::SceneManager::MovableObjectIterator moi = mSceneManager->getMovableObjectIterator("Entity"); moi.hasMoreElements(); moi.moveNext())
		{
			Ogre::Entity *entity = static_cast<Ogre::Entity*>(moi.peekNextValue());

			Ogre::AnimationStateSet* animationStateSet = entity->getAllAnimationStates();		
			if(animationStateSet && animationStateSet->hasAnimationState("Walk"))
			{
				Ogre::AnimationState* walkAnimationState = animationStateSet->getAnimationState("Walk");
				walkAnimationState->addTime(timeElapsedInSeconds);
			}
		}

		float distance = mCameraSpeed * timeElapsedInSeconds;

		if(mKeyStates[Qt::Key_W] == KS_PRESSED)
		{
			mCamera->setPosition(mCamera->getPosition() + mCamera->getDirection() * distance);
		}
		if(mKeyStates[Qt::Key_S] == KS_PRESSED)
		{
			mCamera->setPosition(mCamera->getPosition() - mCamera->getDirection() * distance);
		}
		if(mKeyStates[Qt::Key_A] == KS_PRESSED)
		{
			mCamera->setPosition(mCamera->getPosition() - mCamera->getRight() * distance);
		}
		if(mKeyStates[Qt::Key_D] == KS_PRESSED)
		{
			mCamera->setPosition(mCamera->getPosition() + mCamera->getRight() * distance);
		}

		if(!mIsFirstFrame)
		{
			QPoint mouseDelta = mCurrentMousePos - mLastFrameMousePos;
			mCamera->yaw(Ogre::Radian(-mouseDelta.x() * timeElapsedInSeconds));
			mCamera->pitch(Ogre::Radian(-mouseDelta.y() * timeElapsedInSeconds));

			int wheelDelta = mCurrentWheelPos - mLastFrameWheelPos;
			Ogre::Radian fov = mCamera->getFOVy();
			fov += Ogre::Radian(-wheelDelta * 0.001);
			fov = (std::min)(fov, Ogre::Radian(2.0f));
			fov = (std::max)(fov, Ogre::Radian(0.5f));
			mCamera->setFOVy(fov);
		}
		mLastFrameMousePos = mCurrentMousePos;
		mLastFrameWheelPos = mCurrentWheelPos;

		mIsFirstFrame = false;
	}

	void OgreEngineLogic::shutdown(void)
	{
		mSceneManager->clearScene();
		Ogre::Root::getSingleton().destroySceneManager(mSceneManager);
	}

	void OgreEngineLogic::onKeyPress(QKeyEvent* event)
	{
		mKeyStates[event->key()] = KS_PRESSED;

		if(event->key() == Qt::Key_Escape)
		{
			//qApp->centerWidget(mMainMenu, qApp->mMainWindow);
			//mMainMenu->exec();
		}
	}

	void OgreEngineLogic::onKeyRelease(QKeyEvent* event)
	{
		mKeyStates[event->key()] = KS_RELEASED;
	}

	void OgreEngineLogic::onMousePress(QMouseEvent* event)
	{
		mCurrentMousePos = event->pos();
		mLastFrameMousePos = mCurrentMousePos;
	}

	void OgreEngineLogic::onMouseMove(QMouseEvent* event)
	{
		mCurrentMousePos = event->pos();
	}

	void OgreEngineLogic::onWheel(QWheelEvent* event)
	{
		mCurrentWheelPos += event->delta();
	}

	//Log* OgreEngineLogic::demoLog(void)
	//{
	//	return mDemoLog;
	//}

	void OgreEngineLogic::loadScene(QString filename)
	{
		//The QtOgre DotScene loading code will clear the existing scene except for cameras, as these
		//could be used by existing viewports. Therefore we clear and viewports and cameras before
		//calling the loading code.
		mApplication->ogreRenderWindow()->removeAllViewports();
		mSceneManager->destroyAllCameras();

		//Now load the scene.
		DotSceneHandler handler(mSceneManager);
		QXmlSimpleReader reader;
		reader.setContentHandler(&handler);
		reader.setErrorHandler(&handler);

		QFile file(filename);
		file.open(QFile::ReadOnly | QFile::Text);
		QXmlInputSource xmlInputSource(&file);
		reader.parse(xmlInputSource);

		//Now create a viewport, using the first camera in the scene.
		mCamera = mSceneManager->getCameraIterator().peekNextValue();

		//mCamera->setPosition(0, 0, 20);
		//mCamera->lookAt(0, 0, 0);
		mCamera->setNearClipDistance(1.0);
		mCamera->setFarClipDistance(1000.0);
		//mCamera->setFOVy(Ogre::Radian(1.0f));

		Ogre::Viewport* viewport = mApplication->ogreRenderWindow()->addViewport(mCamera);
		viewport->setBackgroundColour(Ogre::ColourValue::Black);
	}
}
currently gives me:

Code: Select all

Error	1	error C2027: use of undefined type 'QtOgre::Application'	E:\workspace\QTProjects\generat0rX\generat0rX\src\ogreEngineLogic.cpp	45	1	generat0rX
Error	2	error C2227: left of '->ogreRenderWindow' must point to class/struct/union/generic type	E:\workspace\QTProjects\generat0rX\generat0rX\src\ogreEngineLogic.cpp	45	1	generat0rX
Error	3	error C2227: left of '->addViewport' must point to class/struct/union/generic type	E:\workspace\QTProjects\generat0rX\generat0rX\src\ogreEngineLogic.cpp	45	1	generat0rX
Error	4	error C2227: left of '->setBackgroundColour' must point to class/struct/union/generic type	E:\workspace\QTProjects\generat0rX\generat0rX\src\ogreEngineLogic.cpp	45	1	generat0rX
Error	5	error C2027: use of undefined type 'QtOgre::Application'	E:\workspace\QTProjects\generat0rX\generat0rX\src\ogreEngineLogic.cpp	191	1	generat0rX
Error	6	error C2227: left of '->ogreRenderWindow' must point to class/struct/union/generic type	E:\workspace\QTProjects\generat0rX\generat0rX\src\ogreEngineLogic.cpp	191	1	generat0rX
Error	7	error C2227: left of '->removeAllViewports' must point to class/struct/union/generic type	E:\workspace\QTProjects\generat0rX\generat0rX\src\ogreEngineLogic.cpp	191	1	generat0rX
Error	8	error C2027: use of undefined type 'QtOgre::Application'	E:\workspace\QTProjects\generat0rX\generat0rX\src\ogreEngineLogic.cpp	214	1	generat0rX
Error	9	error C2227: left of '->ogreRenderWindow' must point to class/struct/union/generic type	E:\workspace\QTProjects\generat0rX\generat0rX\src\ogreEngineLogic.cpp	214	1	generat0rX
Error	10	error C2227: left of '->addViewport' must point to class/struct/union/generic type	E:\workspace\QTProjects\generat0rX\generat0rX\src\ogreEngineLogic.cpp	214	1	generat0rX
The class definition (GameLogic.h) is included as far as I see.

Any ideas?
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

mboeni wrote: currently gives me:

Code: Select all

Error	1	error C2027: use of undefined type 'QtOgre::Application'	E:\workspace\QTProjects\generat0rX\generat0rX\src\ogreEngineLogic.cpp	45	1	generat0rX
.
.
It looks like it can't find the definition of QtOgre::Application. Can you try including 'Application.h' from OgreEngineLogic.cpp/h?
Post Reply