A port of Three.js into C++.
This is an effort to port Three.js to OpenGL. The main idea is not to create the fastest 3D engine out there, but to create a 3D engine that's simple enough to instantiate, so that other field of computing could use it rapidly for prototyping. Thus reducing the unnecessary hoops for OpenGL newcomers when it comes to thing such as context creation, loading shaders, etc.
I'm not a 3D programmer, I wanted to have a 3D library that I can use to show the results of SLAM / PTAM or Bundle Adjustment, while most sample codes out there use pre OpenGL 3.0 for visualization, and most of them implement their own 3D viewers.
Just be warned that I haven't tried out the part where it automatically installs Homebrew and all the necessary libraries. And for now it's only for OS X, because I don't have a Windows PC
After cloning the repository, go to build/ and run install.sh, it should install Homebrew and the necessary libraries (e.g. glfw3, glm, etc) when it's needed. After that it will proceed to run cmake and make to build the three.cpp library, and run a test program
The code is doing okay, might not be game developers' level, but it works, it shows what it needs to show, and it's quite straightforward.
- Simple primitives (https://www.youtube.com/watch?v=itGcH7vIeBY):
- Texture and Normal mappings (https://www.youtube.com/watch?v=SIQfvJHAWus):
- Environment / cube map (https://www.youtube.com/watch?v=ZHX935KbJRY):
- Shadow mapping (https://www.youtube.com/watch?v=N6oa2CyxTFQ):
- Loading PLY models (https://www.youtube.com/watch?v=xL2jixliwb4):
- Ray casting / picking (https://www.youtube.com/watch?v=Ku-UwyC8RAc)
- Integration with FontStash (https://www.youtube.com/watch?v=82OoIITVs80)
Read more about it here: https://github.com/subokita/Three.cpp-Rev-2/wiki/FAQs