[Solved]Making OgreNewt project in only 1h, 1cpp file.

satchigi

27-05-2011 12:08:38

hello

I'm entirely newbie on OgreNewt and
I'm struggling with intergrating OgreNewt playercontroller demo's sourcecode into my own framework.

I got 2problem.

First, OgreNewt demo's framework is composed of 2h files, 3cpp files.
But my project allows using only 1each header, 1source file for each state.

Second, OgreNewt's demo only uses unbuffered input system.
But my project's gamemanager only allows buffered input system.(If i change, errors occur like 'not match with gamemanager')

To solve first problem,
I applied every playercontroller demo's code inside one cpp file
except only one code that

mFrameListener = new OgreNewtonFrameListener( mWindow, mCamera, mSceneMgr, m_World, mPlayer);
mRoot->addFrameListener(mFrameListener);

As a result, other things work but I can't move or rotate camera and player.
Maybe the reason will be that I only added BasicFrameListener to mRoot(without mFrameListener I just refered),
so mPlayer and mCamera, mScneneMgr is not applied.

Do I should make my own FrameListener to add those to mRoot?

I think I can solve 2nd problem after solve 1st one.
please help!!

Lax

27-05-2011 22:01:39

What is your problem, of having more than one .h and .cpp file? I have in my projects many classes in many files and have them associated in a proper way.

satchigi

28-05-2011 00:50:58

Yes. but
I'm just newbie on programming and following some framework that seriously unfexible.
Can you give me a link of some good tutorial for framework?

My object is intergrating Demo9'character controll into my project.