[ tionisal @ 20.12.2005. 13:40 ] @
Da li mi neko može tačno reći kako da podesim Visual Studio .NET 2003 da bih mogao koristiti OGRE SDK. U tutorijalu piše sljedeće:
Next, configure your project with the following settings. All of these are for the Debug configuration, to set up the Release configuration just change the directories from '\Debug\' to '\Release\'.
Debug : Working Directory = ..\bin\Debug
C/C++ : Preprocessor : Preprocessor Definitions += _STLP_DEBUG (only in Debug mode, not needed for .Net 2003)
C/C++ : Code Generation : Use runtime library = Multithreaded Debug DLL (Multithreaded DLL in Release)
Linker : Output File = ..\bin\Debug\[appname].exe
Linker : Additional Dependencies += OgreMain_d.lib (OgreMain.lib in Release)
For those using the SDK:
C/C++ : Additional Include Directories = ..\include;$(OGRE_HOME)\include
Linker : Additional Library Directories = $(OGRE_HOME)\lib

Gdje to da podesim?
Zatim, kada ga kopmpajliram ne može da pronadje Ogre.h,to je vjerovatno zbog onoga gore, kopiram njega u working directory, a onda ne može da nadje neki drugi itd... Kopiram čitav include folder i uspije, a zatim kada ga linkuje ispiše:
Linking...
SampleApp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: void * __thiscall Ogre::MemoryManager::op_new_sc(unsigned int,unsigned int)" (__imp_?op_new_sc@MemoryManager@Ogre@@AAEPAXII@Z) referenced in function "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
SampleApp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: unsigned int __thiscall Ogre::MemoryManager::_getProcessID(void)" (__imp_?_getProcessID@MemoryManager@Ogre@@AAEIXZ) referenced in function "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
... ... ...

I još jedno pitanje,šta da upišem u plugins.cfg i u resources.cfg ?

Hvala:)
[ rapidlord @ 20.12.2005. 16:30 ] @
Probaj da setujes OGRE_HOME da odgovara putanji do Ogre root direktorijuma.

Control Panel -> Device -> Advanced -> Envirnoment Variables -> New -> System Variable.

variable name: OGRE_HOME
value: c:\Ogre .. (ili vec gde ti se nalazi ogre)

Restartuj racunar.

Ili jos jednostavnije u C/C++ i Linker: stavi fiksne putanje do Ogra.

Mada mislim da bi ovo Ogre sam trebao da podesi pri instalaciji!?
[ std::geek @ 20.12.2005. 19:07 ] @
Sve ovo treba podesiti u Project/Properties.

Sto se tice plugin.cfg, u tom fajlu naznaci ono sto ces koristiti od plugin-ova i relativnu putanju (u odnosu na .exe fajl ili working folder ukoliko debagujes) do foldera koji sadrzi dll-ove plugin-ova, npr.:

Code:

# Defines plugins to load

# Define plugin folder
PluginFolder=plugins

# Define plugins

Plugin=RenderSystem_Direct3D9
Plugin=Plugin_ParticleFX
Plugin=Plugin_BSPSceneManager
Plugin=Plugin_CgProgramManager


Osim plaginova, da bi tvoja aplikacija mogla da radi potrebno je da u folderu gde ti je exe budu i sledeci dll-ovi:

OgreMain.dll
OgrePlatform.dll
cg.dll
DevIL.dll
ILU.dll
ILUT.dll
zlib1.dll

ako koristis GUI i sledeci plugin-ovi:

OgreGUIRenderer.dll
CEGUIBase.dll
CEGUITaharezLook.dll
CEGUIWindowsLook.dll

ako koristis Reference Application Layer i ovaj:

ReferenceAppLayer.dll

Sto se resources.cfg tice tu treba navesti putanje do foldera koji sadrze resurse koje koristis (teksture, fragment i vertex shaderi, skriptovi, modeli itd.)

Primer:

Code:

# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=Media/packs/OgreCore.zip

# Resource locations to be added to the default path
[General]
FileSystem=Media
FileSystem=Media/fonts
FileSystem=Media/materials/programs
FileSystem=Media/materials/scripts
FileSystem=Media/materials/textures
FileSystem=Media/models
FileSystem=Media/overlays
FileSystem=Media/particle
FileSystem=Media/gui
Zip=Media/packs/cubemap.zip
Zip=Media/packs/cubemapsJS.zip
Zip=Media/packs/dragon.zip
Zip=Media/packs/fresneldemo.zip
Zip=Media/packs/ogretestmap.zip
Zip=Media/packs/skybox.zip


plugin.cfg i resources.cfg stavi u isti folder gde ti je i exe.
[ franticnick @ 21.12.2005. 09:38 ] @
Ako si skinuo:
http://www.ogre3d.org/index.ph...ilecatid=2&parent=category sve bi trebalo da radi bez ikakvih podesavanja.

Ako si pak skinuo: http://www.ogre3d.org/index.ph...ilecatid=9&parent=category

onda treba da skines i: http://www.ogre3d.org/index.ph...lecatid=32&parent=category

kao i da instaliras DirectX 9 SDK i DirectX 7 SDK i podesis putanje u VC++.

Da bi izbegao manuelno podesavanje VC++, za nove projekte koristi Application Wizard: http://www.ogre3d.org/phpBB2/viewtopic.php?t=10543

Pozdrav,
Nikola.

[Ovu poruku je menjao franticnick dana 21.12.2005. u 10:51 GMT+1]
[ franticnick @ 21.12.2005. 09:40 ] @
I da, obavezno prodji kroz tutorijale: http://www.ogre3d.org/wiki/index.php/Ogre_Tutorials

Dobro su uradjeni i verujem da posle njih mnogo toga postaje jasnije.

Pozdrav,
Nikola.
[ tionisal @ 21.12.2005. 20:33 ] @
morao sam samo da dodam za c++:/Op /I "..\include" /I "c:\OgreSDK\include"
a za linker: /LIBPATH:"c:\OgreSDK\lib" OgreMain_d.lib
a za plugins i resources ono što je std::geek već rekao...
i sve je radilo kako treba,mislim na primjere iz tutorijala tj. nije mi tražio da imam DirectX SDK instaliran...
Nemem originalnu kopiju XP-a tako da ga ne mogu skinuti sa microsoftovog sajta:)
ima li iko od vas podignut FTP hahahahaha...
engine je stvarno dobar,mislim na samu arhitekturu...
da li sam ja to dobro razumio da mogu čak prodati bilo šta što napišem koristeći ovaj engene?

hvala vam na pomoći

[Ovu poruku je menjao tionisal dana 21.12.2005. u 21:40 GMT+1]
[ franticnick @ 21.12.2005. 21:16 ] @
Citat:
tionisal:
da li sam ja to dobro razumio da mogu čak prodati bilo šta što napišem koristeći ovaj engene?


Da, odlicno si razumeo. Vec ima par komercijalnih igara uradjenih uz pomoc Ogrea. Izdojio bih:

Ankh www.ankh-game.de (proglasena za najbolju nemacku igru u 2005. godini)
Pacific Storm www.pacificstorm.net (tek treba da izadje, sudeci po screenshot-ovima igra obecava)


Citat:

License

Ogre is licensed under the GNU Lesser Public License (LGPL). This basically means that you can get the full source code for nothing, nada, zip. There is such a thing as a free lunch.

Under the LGPL you may use Ogre for any purpose you wish, as long as you:

1. Release any modifications to the OGRE source back to the community
2. Pass on the source to Ogre with all the copyrights intact
3. Make it clear where you have customised it.

The above is a precis, please read the full license agreement before downloading any source.

In addition, if you use Ogre it would be nice if you would display the Ogre logo somewhere in your application (start up or shutdown) for a minimum of 2 seconds. This splash-screen is displayed on the standard Ogre configuration dialog anyway, so if you use that you don't need to do anything extra. The logo is included in the download archive as Samples\Media\ogrelogo.png. You don't have to do this under the conditions of the LGPL, but it would be appreciated.
Using OGRE for commercial projects

Commercial products can be made using Ogre with no limitations other than the ones listed above.


Pozdrav,
Nikola.