OGRE Newbie's Tutorials

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
User avatar
clioman
Halfling
Posts: 67
Joined: Tue Dec 07, 2004 12:19 am
Location: Greece
Contact:

Post by clioman » Fri Dec 17, 2004 5:45 pm

scenenode::yaw needs the parameter to be changed into degrees. I ahd the same problem and I lookd in the samples and got it.
scenenode::yaw (Degrees(45.0f));
that should do it.
0 x

User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac » Fri Dec 17, 2004 5:48 pm

http://centaurforce.sourceforge.net/Ogr ... rial_2.htm

There is the second tutorial, it is the largest of the bunch.

You can download the files at

http://centaurforce.sourceforge.net/Ogr ... torial.rar
0 x
phear hingo

My Webpage

philvanzu
Gnoblar
Posts: 3
Joined: Fri Dec 17, 2004 11:47 am

Post by philvanzu » Fri Dec 17, 2004 8:33 pm

Woohoo Thanks Robomaniac.

I got yaw to work quite well with scenenode::yaw (Radian(1 * evt.TimeSinceLastFrame)) if I remember well, thanks to the great API documentation.
0 x

User avatar
clioman
Halfling
Posts: 67
Joined: Tue Dec 07, 2004 12:19 am
Location: Greece
Contact:

Post by clioman » Sat Dec 18, 2004 3:39 pm

Just something i noticed, you could as well use the Working Directory of the VS project, or update the enviroment variables of the system, that way you don't need to copy the ogre dlls to the parent folder of the application.

Good job on the tutorials, they are well written, and it really helps. Can frame listeners be used with this code setup? I guess that fireFrameStarted iterates through the frameListeners registered through Root:: AddFrameListener and does the same job?
0 x

User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac » Sat Dec 18, 2004 4:55 pm

The way that the code is written, you can use frame listeners right out've the box. Just register it with the root and it will be called each time it updates.

I personally don't use them because with my engine I just stack update calls. (the engine's update calls the gamestate's update calls the player manager's update calls the player's update etc)

I always like copying the ogre dll's to the parent app's folder to avoid confusion. Also, when it comes to distribution time, you don't need them to set any variables or recompile it.

Last night I noticed a bug in the code posted :oops: , and I want to add a section for changing the Working Directory so you can run the program from inside Visual C++
0 x
phear hingo

My Webpage

FlashMerlot
Gnoblar
Posts: 3
Joined: Sat Dec 18, 2004 4:43 pm

Version Difference?????

Post by FlashMerlot » Sat Dec 18, 2004 8:03 pm

I'm using VSdev 2003 Ver: 7.1.3088
Framework 1.1 - Ver: 1.1.4322

The first time I opened OGRE.SLN ... I'm asked ....

Solution 'C:\Ogre_Turorials\ogrenew\ogre.sln' and its projects must be converted to the formats used by this version of Visual Studio .NET.
Convert this solution and all of it's projects?
YES? NO?

============
so I answered ... YES
iz'at OK?
0 x

User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac » Sat Dec 18, 2004 8:13 pm

Yes, thats what you want to do.

I thought i mentioned it in the tutorial, guess i didnt :oops: :P
0 x
phear hingo

My Webpage

FlashMerlot
Gnoblar
Posts: 3
Joined: Sat Dec 18, 2004 4:43 pm

Two Failed

Post by FlashMerlot » Sat Dec 18, 2004 9:29 pm

I've been following your tutorial.

After Build -> Batch
I did not get "most glorious message ever created by mankind " :)
Instead ... I got ...

Build: 76 succeeded, 2 failed, 0 skipped

Tracing back the compile log ....
------ Build started: Project: RenderSystem_Direct3D9,
Configuration: Release Win32 ... and ...
Configuration: Debug Win32

19 failures in each - fatal error C1083: Cannot open include file: 'd3d9.h': No such file or directory

=======================================

searching \Ogre_Tutorials\ogrenew\

I did find this
C:\Ogre_Tutorials\ogrenew\Dependencies\include\Cg\cgD3D9.h

Did I do something wrong?
0 x

FlashMerlot
Gnoblar
Posts: 3
Joined: Sat Dec 18, 2004 4:43 pm

And another thing

Post by FlashMerlot » Sat Dec 18, 2004 9:51 pm

One more thing ... I did NOT install stlport because according to

TheAbsoluteNewbiesGuidetoOGRE at
http://ogre.digitalsentience.com/wiki/i ... uidetoOGRE

I QUOTE ......
.......... How do I install STLport?
.......... - If you're using Visual C++.Net 2003:
.......... * You don't need to install STLPort!

------------------------

Should I install STLport .... or not?
0 x

User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac » Sat Dec 18, 2004 11:00 pm

You need to download the directx sdk, I forgot to mention that ion the tutorial :oops: :(

I'll update the 1st tutorial tonigth
0 x
phear hingo

My Webpage

User avatar
bal
Greenskin
Posts: 100
Joined: Thu Dec 09, 2004 7:29 pm
Location: Geluwe, Belgium

Re: And another thing

Post by bal » Sat Dec 18, 2004 11:15 pm

FlashMerlot wrote:Should I install STLport .... or not?
From my poor experience I would say: Yes. It's not needed but it appears to be faster than Microsoft's code...
0 x

klepto
Gnoblar
Posts: 6
Joined: Mon Jan 03, 2005 1:19 am

Post by klepto » Tue Jan 04, 2005 2:34 am

I have a question about this code from the tutorial:

while (i.hasMoreElements())
{
type = i.peekNextKey();
arch = i.peekNextValue();

Ogre::ResourceManager::addCommonArchiveEx(arch, type);
}

on my system it loops indefinitely - I had to add i.moveNext() after the call to addCommonArchiveEx.

Maybe its a version problem - any thoughts ?
0 x

User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac » Tue Jan 04, 2005 3:56 am

u need to add i.getNext() to the end of the loop, i'm sorry about that, that should be the only bug though
0 x
phear hingo

My Webpage

User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia
Contact:

Post by monster » Tue Jan 04, 2005 4:06 am

...that should be the only bug though
Lubarsky's Law of Cybernetic Entomology:
"There's always one more bug."
0 x

User avatar
AnimalMachine
Gnoblar
Posts: 19
Joined: Sun Jan 19, 2003 4:36 pm
Location: Milwaukee, WI USA

Post by AnimalMachine » Wed Jan 05, 2005 7:08 am

I've just started to toy around with Ogre again. After almost 2 years of working with C# at work my C++ skills feel a bit atrophied. So with that I started in on your tutorials. Overall, I found them helpful.

Here's some feedback on them:

1) CVS HEAD is somewhat busted up according to this thread, which I found out in my search for updated dependency files because the one linked at the top of tutorial 1 is no longer valid for the CVS copy. Perhaps a fork in the path is needed to describe installing the stable package (not that it's really different) - or at least mention the existance of them. This wasn't a problem for me, but may be for others.

2) Viewing tutorial 1 from here has a few broken images or badly scaled ones. Tutorial 2 has oddly scaled images as well.

3) When doing the project settings for the first time in tutorial 2, I didn't have the C/C++ set of project options because my project was blank. Adding the main.cpp file solved this. (I'm using VS.NET 2003)

4) When creating plugins.cfg and resources.cfg in tutorial 2 you didn't mention where to put them. Since I just copied files to the debug folder I thought you meant they should go there. The reality is that they need to be accessible by PATH I guess, so the easiest way is to put them in the Working Folder for the project (where you probably wanted us to put them) or to change the Working Folder to be debug/release.

5) The section of code loading & parsing resources.cfg isn't needed for this particular tutorial since the file is blank anyway.

Thanks again for the tutorial.
0 x

User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac » Wed Jan 05, 2005 7:32 am

Yup, i plan on eventaully revamping/completeing these, don't have time right now though :\
0 x
phear hingo

My Webpage

User avatar
AnimalMachine
Gnoblar
Posts: 19
Joined: Sun Jan 19, 2003 4:36 pm
Location: Milwaukee, WI USA

Post by AnimalMachine » Wed Jan 05, 2005 4:09 pm

I know how that goes. ;)
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Wed Jan 05, 2005 4:40 pm

Robomaniac, when you get the impression, that you won't have time for it soon, you can always make it a team effort by integrating it into the inofficial Ogre wiki. So everybody can correct the eternal last bug. ;)

The wiki seems to have some momentum at the moment. More fodder ensures it stays so. Just a suggestion. :)
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

Post Reply