【发布时间】:2016-01-23 22:06:55
【问题描述】:
我已经完成了关于使用 Java 和 lwjgl 在 OpenGL 中制作 3D 渲染引擎的完整教程,制作教程的人也用 C++ 编写了引擎
为了增加我的编程知识,我也想看看 C++ 版本。此外,我相信(我可能完全错了)我实际上可以用 C++ 做比用 java 做的更多的事情。我遇到的主要问题是,尽管包含说明,但我无法让引擎运行,如果有人能帮助我,我将不胜感激。
这是我要设置的引擎:https://github.com/BennyQBD/3DEngineCpp
我想在这个项目中使用 CodeBlocks,因为它是推荐的,与 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
主要问题是,因为我只在 Eclipse 中完成了 java 编码,所以我有点困惑..
他所说的“打开终端并运行:'''Shell”是什么意思?我应该如何安装glew、sdl2和assimp?什么是 cd 构建?为什么我需要 CMake,它并没有真正提到它的作用..?
也许有人可以详细说明(如果可能的话,一步一步地)我需要做什么才能让它运行,非常感谢!
【问题讨论】:
标签: c++ opengl codeblocks