Thursday, October 23, 2008


I've made significant progress and will be updating this blog more frequently in the future to document my progress. I've successfully integrated the Qt framework into the raytracing application at this point. This allows me to write the GUI once and have it work across different platforms. In addition I am making use of the Qt's image file and concurrency faculties, again these work across different platforms without me having to change the code.

The render pipeline has been updated to use Qt's concurrent map function, which I am using to map each (x,y) point I need pixel information for to a render pixel function. Qt will take care of multi-threading under the hood for me, which saves me lots of headaches.
The GUI now has close, load, render, stop, and save buttons. Unfortunately stop needs work, although I call the cancel method on the cuncurrent map process it will not stop until it is done rendering even if the application has closed. This is a pretty big issue that I hope to resolve soon. Load is a work in progress, I rather dislike having to recompile each time I change the scene's build function, so I decided to create a file parsing class to build the scene given a text file as input which will eliminate the need to recompile for each change in scene allowing for faster testing and development. It's not done yet, but it's coming along nicely. Render starts the threaded rendering process for the current scene and updates the display to show render progress. Save, opens a file dialog and lets you save the rendered image as a .png file, a useful addition without which the only way to save an image was to do a printscreen and paste into an image editor.
I've spent at least 6 hours on this in the past 2 days, now if only I could put that much time into my math homework!