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 »

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.
User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac »

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
phear hingo

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

Post by philvanzu »

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.
User avatar
clioman
Halfling
Posts: 67
Joined: Tue Dec 07, 2004 12:19 am
Location: Greece
Contact:

Post by clioman »

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?
User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac »

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++
phear hingo

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

Version Difference?????

Post by FlashMerlot »

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?
User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac »

Yes, thats what you want to do.

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

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

Two Failed

Post by FlashMerlot »

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?
FlashMerlot
Gnoblar
Posts: 3
Joined: Sat Dec 18, 2004 4:43 pm

And another thing

Post by FlashMerlot »

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?
User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac »

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

I'll update the 1st tutorial tonigth
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 »

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...
klepto
Gnoblar
Posts: 6
Joined: Mon Jan 03, 2005 1:19 am

Post by klepto »

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 ?
User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac »

u need to add i.getNext() to the end of the loop, i'm sorry about that, that should be the only bug though
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 »

...that should be the only bug though
Lubarsky's Law of Cybernetic Entomology:
"There's always one more bug."
User avatar
AnimalMachine
Gnoblar
Posts: 19
Joined: Sun Jan 19, 2003 4:36 pm
Location: Milwaukee, WI USA

Post by AnimalMachine »

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.
User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac »

Yup, i plan on eventaully revamping/completeing these, don't have time right now though :\
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 »

I know how that goes. ;)
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post by haffax »

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. :)
team-pantheon programmer
creators of Rastullahs Lockenpracht
Post Reply