Ogre3D 2.1 Visual Studio 2015CE로 소스 빌드하기 (2부)

1부에 이어서 본편인 ogre3d를 빌드해봅시다.

1. 준비물
ogre3d source : https://bitbucket.org/sinbad/ogre/downloads/?tab=branches
sinbad-ogre-31b6c9476667.zip  /  MD5 : 158bb14e9f55a76cd63d27e2d593df55

Boost Lib : http://www.boost.org/users/history/version_1_63_0.html
boost_1_63_0.zip  /  MD5: 3c706b3fc749884ea5510c39474fd732

기타 라이브러리는 각자 조달을… CMake output Log에 보면 추가되지 않은
그리고 사용 가능한 라이브러리에 대한 설명과 링크가 나옵니다. 그걸 보고 판단하에 추가하던지하면 됩니다.

 

2. Build

1부와 마찬가지로 경로 잘 지정하고 밑에 Configure를 눌러줍니다.
이번엔 에러가 좀 많습니다. 하나하나 살펴보도록 합시다.


send_errorC:/ogre3dBuild/bin/debug/OIS_d.dll did not exist, can’t install!
send_errorC:/ogre3dBuild/bin/release/OIS.dll did not exist, can’t install!

OIS 파일 경로가 지정되지 않아서 그런겁니다. 위에 Advanced 항목에 체크해주고 Search란에 OIS를 검색해줍니다.

제대로 경로 입력해도

send_errorC:/ogre3dBuild/cabalistic-ogredeps-bfc878e4fd9a/src/bin/debug/OIS_d.dll did not exist, can’t install!
send_errorC:/ogre3dBuild/cabalistic-ogredeps-bfc878e4fd9a/src/bin/release/OIS.dll did not exist,

에러는 그대로 뜨네요.  뭐 OIS 찾았다고 나오는거 보면 별 상관없을겁니다.

 


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FREETYPE_FT2BUILD_INCLUDE_DIR (ADVANCED)

이거 역시 freetype 의 경로 문제입니다.

지정해주고 다시 Configure를 눌러주면 위와 같이 잘 찾았다고 나옵니다.

 


이제 잘 살펴봐야 하는게 있습니다.
에러로 나오지 않았다고 하더라도 Could not find 가 뜨는 라이브러리를 찾아서 하나하나 경로를 지정해줘야 합니다.

모든걸 다 할 필요는 없습니다. 그저 자신이 필요한것만 찾아서 하면 됩니다.
하지만 OGREDEPS에 있던 라이브러리는 어찌됬던간에 나중에 쓸일이 있게 되는 경우가 허다하니 거기에 있는데 찾지 못했다고 나온 라이브러리는 전부 찾아줍니다.

가급적 log에
— The following OPTIONAL packages could NOT be located on your system.
— Consider installing them to enable more features from this software.

이 밑에 나오는건 넣어주는게 좋습니다.
이 글을 작성하면서 동시에 빌드하고 테스트 하면서 스샷 찍어 올리는데 CMake에선 별 문제 없이 구성되도
실제 빌드 할때 무슨 헤더파일 없네 경로 틀렸네 엄청나게 에러 뜨더군요.

 

저는 이정도 체크 해줬습니다.  기본값은 아니고 보고 느낌상 이건 필요하겠다 싶은것들만 추가로 체크했습니다.

Configuring OGRE 2.1.0unstable
Search path: C:/ogre3dBuild/sinbad-ogre-31b6c9476667/VCBuild/Dependencies;C:/ogre3dBuild/sinbad-ogre-31b6c9476667/Dependencies;C:/ogre3dBuild/sinbad-ogre-31b6c9476667/VCBuild/../Dependencies;C:/ogre3dBuild/sinbad-ogre-31b6c9476667/../Dependencies
Looking for ZLIB…
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Found ZLIB: optimized;C:/ogre3dBuild/ogredeps/lib/Release/zlib.lib;debug;C:/ogre3dBuild/ogredeps/lib/Debug/zlib_d.lib
Looking for ZZip…
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Could not locate ZZip
Looking for FreeImage…
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Found FreeImage: optimized;C:/ogre3dBuild/ogredeps/lib/Release/FreeImage.lib;debug;C:/ogre3dBuild/ogredeps/lib/Debug/FreeImage_d.lib
Looking for FREETYPE…
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
CMAKE_PREFIX_PATH: C:/ogre3dBuild/sinbad-ogre-31b6c9476667/VCBuild/Dependencies;C:/ogre3dBuild/sinbad-ogre-31b6c9476667/Dependencies;C:/ogre3dBuild/sinbad-ogre-31b6c9476667/VCBuild/../Dependencies;C:/ogre3dBuild/sinbad-ogre-31b6c9476667/../Dependencies
CMAKE_PREFIX_PATH: C:/ogre3dBuild/sinbad-ogre-31b6c9476667/VCBuild/Dependencies;C:/ogre3dBuild/sinbad-ogre-31b6c9476667/Dependencies;C:/ogre3dBuild/sinbad-ogre-31b6c9476667/VCBuild/../Dependencies;C:/ogre3dBuild/sinbad-ogre-31b6c9476667/../Dependencies
Found FREETYPE: optimized;C:/ogre3dBuild/ogredeps/lib/Release/freetype.lib;debug;C:/ogre3dBuild/ogredeps/lib/Debug/freetype_d.lib
Looking for Rapidjson…
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Looking for DirectX9…
Found DirectX9: C:/ogre3dBuild/DX_SDK/Lib/x64/d3d9.lib
Looking for DirectX11…
Found DirectX11: d3d11.lib;dxgi.lib;dxguid.lib
Looking for Cg…
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Found Cg: optimized;C:/ogre3dBuild/ogredeps/lib/cg.lib;debug;C:/ogre3dBuild/ogredeps/lib/cg.lib
Looking for POCO…
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Could not locate POCO
Looking for TBB…
Could not locate TBB
Looking for GLSL_Optimizer…
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Could not locate GLSL_Optimizer
Looking for HLSL2GLSL…
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Could not locate HLSL2GLSL
Looking for OIS…
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Found OIS: optimized;C:/ogre3dBuild/ogredeps/lib/Release/OIS.lib;debug;C:/ogre3dBuild/ogredeps/lib/Debug/OIS_d.lib
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Looking for Softimage…
Could not locate Softimage
Could NOT find TinyXML (missing: TINYXML_INCLUDE_DIR TINYXML_LIBRARIES)
Looking for CppUnit…
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Could not locate CppUnit

—————————————————————————–
— The following external packages were located on your system.
— This installation will have the extra features provided by these packages.
+ zlib
+ freeimage
+ freetype
+ rapidjson
+ OpenGL
+ OpenGL 3+
+ OpenGL ES 1.x
+ OpenGL ES 2.x
+ OpenGL ES 3.x
+ DirectX9
+ DirectX11
+ cg
+ boost
+ boost-thread
+ boost-date_time
+ boost-system
+ boost-chrono
+ boost-atomic
+ OIS
+ SDL2
—————————————————————————–
— The following OPTIONAL packages could NOT be located on your system.
— Consider installing them to enable more features from this software.
+ zziplib: Extract data from zip archives <http://zziplib.sourceforge.net>
+ POCO: POCO framework <http://pocoproject.org/>
+ tbb: Threading Building Blocks <http://www.threadingbuildingblocks.org/>
+ GLSL Optimizer: GLSL Optimizer <http://github.com/aras-p/glsl-optimizer/>
+ HLSL2GLSL: HLSL2GLSL <http://hlsl2glslfork.googlecode.com/>
+ Doxygen: Tool for building API documentation <http://doxygen.org>
+ Softimage: Softimage SDK needed for building XSIExporter <FALSE>
+ TinyXML: TinyXML needed for building OgreXMLConverter <FALSE>
+ CppUnit: Library for performing unit tests <http://cppunit.sourceforge.net>
—————————————————————————–
—————————————————————————-
FEATURE SUMMARY
—————————————————————————-

Building components:
+ MeshLodGenerator
+ Overlay
Building plugins:
+ Particle FX
Building rendersystems:
+ Direct3D 11
+ OpenGL 3.3+
Building executables:
+ Tools
Building core features:
+ Mesh Lod
+ DDS image codec
+ ETC image codec
+ FreeImage codec
+ rapidjson

Build type: dynamic
Threading support: none
Use double precision: disabled
Assert mode: standard
Allocator type: standard
STL containers use allocator: enabled
Strings use allocator: disabled
Memory tracker (debug): disabled
Memory tracker (release): disabled
Use 1.x legacy animations: enabled
Use Boost: enabled
Use SIMD (SSE2): enabled
Use SIMD (NEON): enabled

—————————————————————————-

Configuring done
Generating done

Configure를 누르고 Generate를 눌러주면 VCBuild 폴더에 OGRE.sln 파일이 생깁니다.
이걸 VS2015로 열어주고 빌드를 해주면 끝입니다.

 

정상 빌드가 되었습니다.

 

3. 뒷이야기
사실 빌드 다하면 예전에 만들었던 간단한 판때기 위에 오거 머리 떠 있는 샘플이라도 돌려서 스샷 찍어 올릴려고 했습니다만… 이거 2.0으로 넘어가면서 각종 함수가 사라졌거나 새로 생겼거나 아님 파라미터가 변경된게 좀 되더군요.
(솔직히 말해 에러 줄줄 뜨는거 수정하기 싫어서 그냥 죄다 주석처리)
사실 1.71 버전은 2010년도 정도 나온 버전이고 2.1은 2016년 정도에 올라온 버전이니 (거기다가 메이저 버전업까지 했으니) 많이 변하긴 했겠지요.

문제는 2.1도 현재 개발중이라 그런지 아님 제가 못찾는건지 제대로 된 API 문서가 보이지 않습니다.
인터넷 검색시 보통 연결은 1.9 문서가 많이 나오고요. (소스에 있는 doc 문서도 1.10인가 그러더군요)
구글 안드로이드 API는 검색하면 어느 함수가 버전업에 따라 사라지면 해당 API문서에 몇버전부터는 사용불가 이런식으로 안내를 해줘서 편했는데 그런거 많이 접하다 보니 ogre3d는 많이 불편하네요.

뭐 그러거나 말거나 한때 제 밥벌이용으로 잘 쓰던거긴 한데 요즘 대세나 제 포지션으로 보나 앞으로 이걸 쓸 일은 없어보이더군요. 그래서 추억정리및 자료 정리전에 마지막으로 한번 빌드나 해보자 라는 생각으로 시작한건데 생각보다 시간이 길어졌습니다.
쓰고 나서 본문을 읽어보니 별로 전달할만한 내용은 없는거 같습니다. 거의 에러의 원인은 라이브러리 경로 지정 문제였는데 그게 너무 많다고 생략해버렸으니…

이 뒤로는 그냥 검은 화면…
아랜 ogre.log 파일 내용…

19:59:09: Creating resource group General
19:59:09: Creating resource group Internal
19:59:09: Creating resource group Autodetect
19:59:09: SceneManagerFactory for type ‘DefaultSceneManager’ registered.
19:59:09: Registering ResourceManager for type Material
19:59:09: Registering ResourceManager for type Mesh
19:59:09: Registering ResourceManager for type Mesh2
19:59:09: Registering ResourceManager for type OldSkeleton
19:59:09: MovableObjectFactory for type ‘ParticleSystem’ registered.
19:59:09: ArchiveFactory for archive type FileSystem registered.
19:59:09: DDS codec registering
19:59:09: FreeImage version: 3.15.3
19:59:09: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
19:59:09: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic
19:59:09: ETC codec registering
19:59:09: Registering ResourceManager for type HighLevelGpuProgram
19:59:09: MovableObjectFactory for type ‘Entity’ registered.
19:59:09: MovableObjectFactory for type ‘Item’ registered.
19:59:09: MovableObjectFactory for type ‘Light’ registered.
19:59:09: MovableObjectFactory for type ‘BillboardSet’ registered.
19:59:09: MovableObjectFactory for type ‘ManualObject2’ registered.
19:59:09: MovableObjectFactory for type ‘BillboardChain’ registered.
19:59:09: MovableObjectFactory for type ‘RibbonTrail’ registered.
19:59:09: MovableObjectFactory for type ‘WireAabb’ registered.
19:59:09: Loading library .\RenderSystem_Direct3D11_d
19:59:09: Installing plugin: D3D11 RenderSystem
19:59:09: D3D11 : Direct3D11 Rendering Subsystem created.
19:59:09: D3D11: Driver Detection Starts
19:59:09: D3D11: Driver Detection Ends
19:59:09: Plugin successfully installed
19:59:09: Loading library .\RenderSystem_GL3Plus_d
19:59:09: Installing plugin: GL 3+ RenderSystem
19:59:09: OpenGL 3+ Rendering Subsystem created.
19:59:10: Plugin successfully installed
19:59:10: Loading library .\Plugin_ParticleFX_d
19:59:10: Installing plugin: ParticleFX
19:59:10: Particle Emitter Type ‘Point’ registered
19:59:10: Particle Emitter Type ‘Box’ registered
19:59:10: Particle Emitter Type ‘Ellipsoid’ registered
19:59:10: Particle Emitter Type ‘Cylinder’ registered
19:59:10: Particle Emitter Type ‘Ring’ registered
19:59:10: Particle Emitter Type ‘HollowEllipsoid’ registered
19:59:10: Particle Affector Type ‘LinearForce’ registered
19:59:10: Particle Affector Type ‘ColourFader’ registered
19:59:10: Particle Affector Type ‘ColourFader2’ registered
19:59:10: Particle Affector Type ‘ColourImage’ registered
19:59:10: Particle Affector Type ‘ColourInterpolator’ registered
19:59:10: Particle Affector Type ‘Scaler’ registered
19:59:10: Particle Affector Type ‘Rotator’ registered
19:59:10: Particle Affector Type ‘DirectionRandomiser’ registered
19:59:10: Particle Affector Type ‘DeflectorPlane’ registered
19:59:10: Plugin successfully installed
19:59:10: *-*-* OGRE Initialising
19:59:10: *-*-* Version 2.1.0unstable (Tindalos)
19:59:10: D3D11 : RenderSystem Option: Allow NVPerfHUD = No
19:59:10: D3D11 : RenderSystem Option: Backbuffer Count = Auto
19:59:10: D3D11 : RenderSystem Option: Driver type = Hardware
19:59:10: D3D11 : RenderSystem Option: FSAA = 1
19:59:10: D3D11 : RenderSystem Option: Floating-point mode = Fastest
19:59:10: D3D11 : RenderSystem Option: Full Screen = No
19:59:10: D3D11 : RenderSystem Option: Information Queue Exceptions Bottom Level = Info (exception on any message)
19:59:10: D3D11 : RenderSystem Option: Max Requested Feature Levels = 11.1
19:59:10: D3D11 : RenderSystem Option: Min Requested Feature Levels = 9.1
19:59:10: D3D11 : RenderSystem Option: Rendering Device = NVIDIA GeForce GTX 1060 6GB_0
19:59:10: D3D11 : RenderSystem Option: VSync = No
19:59:10: D3D11 : RenderSystem Option: VSync Interval = 1
19:59:10: D3D11 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
19:59:10: D3D11 : RenderSystem Option: sRGB Gamma Conversion = No
19:59:10: CPU Identifier & Features
19:59:10: ————————-
19:59:10: * CPU ID: GenuineIntel: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
19:59:10: * Logical cores: 8
19:59:10: * SSE: yes
19:59:10: * SSE2: yes
19:59:10: * SSE3: yes
19:59:10: * MMX: yes
19:59:10: * MMXEXT: yes
19:59:10: * 3DNOW: no
19:59:10: * 3DNOWEXT: no
19:59:10: * CMOV: yes
19:59:10: * TSC: yes
19:59:10: * FPU: yes
19:59:10: * PRO: yes
19:59:10: * HT: no
19:59:10: ————————-
19:59:10: D3D11 : Subsystem Initialising
19:59:10: D3D11RenderSystem::_createRenderWindow “OGRE Render Window”, 800×600 windowed miscParams: FSAA=1 FSAAHint= colourDepth=16 gamma=false useNVPerfHUD=false vsync=false vsyncInterval=1
19:59:10: D3D11 : WARNING – disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
19:59:10: D3D11 : Created D3D11 Rendering Window ‘OGRE Render Window’ : 800×600, 32bpp
19:59:10: Registering ResourceManager for type Texture
19:59:10: Registering ResourceManager for type GpuProgram
19:59:10: RenderSystem capabilities
19:59:10: ————————-
19:59:10: RenderSystem Name: Direct3D11 Rendering Subsystem
19:59:10: GPU Vendor: nvidia
19:59:10: Device Name: NVIDIA GeForce GTX 1060 6GB_0
19:59:10: Driver Version: 21.21.13.7878
19:59:10: * Fixed function pipeline: no
19:59:10: * Hardware generation of mipmaps: yes
19:59:10: * Texture blending: yes
19:59:10: * Anisotropic texture filtering: yes
19:59:10: * Dot product texture operation: yes
19:59:10: * Cube mapping: yes
19:59:10: * Hardware stencil buffer: yes
19:59:10: – Stencil depth: 8
19:59:10: – Two sided stencil support: yes
19:59:10: – Wrap stencil values: yes
19:59:10: * Hardware vertex / index buffers: yes
19:59:10: * 32-bit index buffers: yes
19:59:10: * Vertex programs: yes
19:59:10: * Number of floating-point constants for vertex programs: 512
19:59:10: * Number of integer constants for vertex programs: 16
19:59:10: * Number of boolean constants for vertex programs: 16
19:59:10: * Fragment programs: yes
19:59:10: * Number of floating-point constants for fragment programs: 512
19:59:10: * Number of integer constants for fragment programs: 16
19:59:10: * Number of boolean constants for fragment programs: 16
19:59:10: * Geometry programs: yes
19:59:10: * Number of floating-point constants for geometry programs: 512
19:59:10: * Number of integer constants for geometry programs: 16
19:59:10: * Number of boolean constants for geometry programs: 16
19:59:10: * Tessellation Hull programs: yes
19:59:10: * Number of floating-point constants for tessellation hull programs: 512
19:59:10: * Number of integer constants for tessellation hull programs: 16
19:59:10: * Number of boolean constants for tessellation hull programs: 16
19:59:10: * Tessellation Domain programs: yes
19:59:10: * Number of floating-point constants for tessellation domain programs: 512
19:59:10: * Number of integer constants for tessellation domain programs: 16
19:59:10: * Number of boolean constants for tessellation domain programs: 16
19:59:10: * Compute programs: yes
19:59:10: * Number of floating-point constants for compute programs: 512
19:59:10: * Number of integer constants for compute programs: 16
19:59:10: * Number of boolean constants for compute programs: 16
19:59:10: * Supported Shader Profiles: cs_4_0 cs_4_1 cs_5_0 ds_5_0 gs_4_0 gs_4_1 gs_5_0 hlsl hs_5_0 ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3 ps_4_1 ps_5_0 vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_4_1 vs_5_0
19:59:10: * Texture Compression: yes
19:59:10: – DXT: yes
19:59:10: – VTC: no
19:59:10: – PVRTC: no
19:59:10: – ATC: no
19:59:10: – ETC1: no
19:59:10: – ETC2: no
19:59:10: – BC4/BC5: yes
19:59:10: – BC6H/BC7: yes
19:59:10: * Hardware Occlusion Query: yes
19:59:10: * User clip planes: yes
19:59:10: * VET_UBYTE4 vertex element type: yes
19:59:10: * Infinite far plane projection: yes
19:59:10: * Hardware render-to-texture: yes
19:59:10: * Floating point textures: yes
19:59:10: * Non-power-of-two textures: yes
19:59:10: * 1d textures: yes
19:59:10: * Volume textures: yes
19:59:10: * Max Texture resolution (2D) 16384
19:59:10: * Max Texture resolution (3D) 2048
19:59:10: * Max Texture resolution (Cubemaps) 16384
19:59:10: * Multiple Render Targets: 8
19:59:10: – With different bit depths: yes
19:59:10: * Point Sprites: yes
19:59:10: * Extended point parameters: yes
19:59:10: * Max Point Size: 256
19:59:10: * Vertex texture fetch: yes
19:59:10: * Number of world matrices: 0
19:59:10: * Number of texture units: 16
19:59:10: * Stencil buffer depth: 8
19:59:10: * Number of vertex blend matrices: 0
19:59:10: – Max vertex textures: 4
19:59:10: – Vertex textures shared: no
19:59:10: * Render to Vertex Buffer : yes
19:59:10: * Hardware Atomic Counters: no
19:59:10: ***************************************
19:59:10: *** D3D11 : Subsystem Initialized OK ***
19:59:10: ***************************************
19:59:10: DefaultWorkQueue(‘Root’) initialising on thread main.
19:59:10: Particle Renderer Type ‘billboard’ registered
19:59:10: Parsing scripts for resource group Autodetect
19:59:10: Finished parsing scripts for resource group Autodetect
19:59:10: Creating resources for group Autodetect
19:59:10: All done
19:59:10: Parsing scripts for resource group General
19:59:10: Finished parsing scripts for resource group General
19:59:10: Creating resources for group General
19:59:10: All done
19:59:10: Parsing scripts for resource group Internal
19:59:10: Finished parsing scripts for resource group Internal
19:59:10: Creating resources for group Internal
19:59:10: All done

PS. 빌드하면서 알게된것중 하나가 NVIDIA CG 기술이 2012년 이후로 업뎃이 없더군요.
이거 배운다고 회사에서 책도 사고 그랬던걸로 기억하는데…


크리에이티브 커먼즈 라이선스Linsoo의 저작물인 이 저작물은(는)크리에이티브 커먼즈 저작자표시-동일조건변경허락 4.0 국제 라이선스에 따라 이용할 수 있습니다.

댓글 남기기

이메일은 공개되지 않습니다.

This site uses Akismet to reduce spam. Learn how your comment data is processed.