Note, this is an old version of NEngine that had about 2 weeks of development in total and used to create the HPS1 game Betula. The engine has continuoed it's development in a private repo, which I'm planning to open one day.
Only used for learning about making games in C++ and OpenGL. Not to be used for anything serious.
Uses:
- GLFW
- GLEW
- glm
- meshoptimizer by Arseny Kapoulkine
- stb_image
- FrustumCull.h by podgorskiy, based on this by Inigo Quilez
- instrumentor.h, original by TheCherno, improved by David Churchill
- glm is not included in the repo. Get it from glm page and copy "glm" folder to (repo location)/NEngine/vendor/glm.
- You need to build bullet. Here is how to do it in case you don't want to spend a day figuring out how to like I did:
- Clone or download bullet repo
- Open the root with CMAKE (I used cmake GUI, but if you're hardcore you can use the commandline too)
- cmake: Make sure to select win32 MSVC
- cmake: Enable USE_MSVC_RUNTIME_LIBRARY_DLL, this is important because if you don't it will give you a LNK2038 error, a missmatch between dynamic and static library, which is weird, didn't understand, but just do it.
- cmake: Generate
- Go into your build folder and open BULLET_PHYSICS.sln
- Right click on ALL_BUILD > Build, it'll take around 5 minutes to build
- You should build for both Release and Debug, select the other one above in the toolbar and build again.
- Now in lib folder there will be Release and Debug folders filled with lib files. Copy them to NEngine/Dependencies/bullet/ (make a bullet folder first). Note: you don't actually need all the libs, I'll write here later which ones you actually need.
- Now for include, Bullet doesn't come with separated headers so you'll have to prune them yourself. First go to root bullet repo folder, copy src folder and paste it into NEngine/Dependencies/bullet/.
- Rename the src folder to include
- Now in that folder, search for all .cpp, .py and .txt files and delete them so that only .h files are left.
- That should be it, you should now be able to build NEngine.
- TheCherno's OpenGL tutorials
- OpenGL common beginner mistakes
- My thread on importance of using a mesh optimizer
- Arseny Kapolkine on finding the best optimization algorhitm
- A glitch I encountered that accidentally demonstrates the difference in vertex thread blocks without and with optimiztion