Much like Blender's different display modes, it should be possible to switch between OpenGL pipeline rendering and raytracing. This could work by having the raytracer render into a buffer which is periodically swapped with a mutex-protected one that the OpenGL rendering thread can read, then draw to a ScreenQuad.
The most crucial part of this issue, however, is that the raytracing code and the pipeline rendering code should use the same classes and similar interfaces to geometry, lighting, etc. This will help to bring the pipeline renderer's behavior closer to the physically-based raytracer.
Also, the graphics directory needs to be restructured to have better encapsulation.
Much like Blender's different display modes, it should be possible to switch between OpenGL pipeline rendering and raytracing. This could work by having the raytracer render into a buffer which is periodically swapped with a mutex-protected one that the OpenGL rendering thread can read, then draw to a
ScreenQuad
.The most crucial part of this issue, however, is that the raytracing code and the pipeline rendering code should use the same classes and similar interfaces to geometry, lighting, etc. This will help to bring the pipeline renderer's behavior closer to the physically-based raytracer.
Also, the
graphics
directory needs to be restructured to have better encapsulation.