Ongoing port of Three.cpp


This is an ongoing process of porting Three.js to C++ / 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. Continue reading

Shadow mapping on OpenGL


Around 2 – 3 months ago, I decided to learn OpenGL 3 / 4. Since previously I have just been using OpenGL 2, which uses API like this: glMatrixMode( GL_PROJECTION ), or like this: glLightfv( … ), etc.

Obviously those are outdated, so I decided to refresh myself and learn OpenGL 3 (and above), which heavily utilize shaders.

And here’s a (crappy) result. Basically the idea is to first render your objects’ depth into depth buffer first, and then render the shadow to the screen along with the 3D models

You can get those models from Stanford 3D Scanning Repository, and load them as vertices using assimp library.