我已經完成了一個關於在OpenGL中用Java和lwjgl製作3D渲染引擎的全部教程,以及製作教程的人也使用C++編寫了引擎使用GLEW,assimp,SDL2和CMake與CodeBlocks的C++ OpenGL項目設置
爲了增加我對編程的知識,我也想看看C++版本。我也相信(而且我可能完全錯誤),我實際上可以用C++做比java更多的事情。我遇到的主要問題是,儘管包含了說明,但仍無法使引擎運行,如果有人能幫助我,我將不勝感激。
這是我想設置發動機:https://github.com/BennyQBD/3DEngineCpp
我想使用的代碼塊這個項目,因爲它是建議而不像Visual Studio中它是免費的。我也已經下載GLEW,assimp和SDL和我安裝CMake,這是運行所需的。現在我已經按照該指令在這裏這身打扮:
###Windows/MinGW###
- Make sure CMake is both installed and added to the system PATH.
- Open a Terminal and run:
```Shell
# install dependencies
# Install GLEW in %PROGRAMFILES%/GLEW or SET %GLEW_ROOT_DIR% to where GLEW is on your machine (Example: D:\PATH_TO_GLEW)
# Install SDL2 in %PROGRAMFILES%/SDL2 or SET %SDL2_ROOT_DIR% to where SDL2 is on your machine (Example: D:\PATH_TO_SDL2)
# Install ASSIMP in %PROGRAMFILES%/ASSIMP or SET %ASSIMP_ROOT_DIR% to where ASSIMP is on your machine (Example: D:\PATH_TO_ASSIMP)
cd build
# REPLACE "Visual Studio 12" with your preferred build toolchain (Maybe you want "Codeblocks - MinGW Makefiles")
# BTW VS 10 is VS 2010, VS 11 is VS 2012 and VS 12 is VS 2013, BLAME MicroSoft for the naming! LOL!
cmake -G "Visual Studio 12" ../
# open the generated SLN file (or cbp file if using CodeBlocks) and build!
```
- Copy the DLLs in /lib/_bin/ to /build/Debug/ and /build/Release/
- In Visual Studio, set the Startup project to 3DEngineCpp
- Move the res folder into the build folder
- Run
主要問題是,因爲我只是在做日食編碼的java我有點糊塗..
他是什麼意思通過「打開終端並運行:'''Shell'?以及我應該如何安裝glew,sdl2和assimp?什麼是CD建立?爲什麼我需要CMake,它沒有真正提到它的作用..?
也許有人可以詳細說明(如果可能,一步一步地)我需要做什麼才能實現這個運行,非常感謝!