Skip to content
This repository has been archived by the owner on Nov 22, 2020. It is now read-only.

A raytracer built during my the Fall 2018 semester of UIUC's CS419: Production Computer Graphics. Built in C/C++, and supports OpenCL (realtime raytracing) on compatible devices with limited rendering features.

License

Notifications You must be signed in to change notification settings

J0Nreynolds/CS419-Raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS419-Raytracer

A raytracer built during my the Fall 2018 semester of UIUC's CS419: Production Computer Graphics. Built in C/C++, and supports OpenCL (realtime raytracing) on compatible devices with limited rendering features.

Final render

Setup

I followed these instructions here (seems that MacOS OpenCL headers for C are included, but those for C++ are not) and used [this code sample](from https://gist.github.com/ddemidov/2925717) to get OpenCL working. I had to copy a distribution of the OpenCL C++ headers, cl.hpp, to my /System/Library/Frameworks/OpenCL.framework/Headers folder in order to include OpenCL bindings in my project.

I ran into some issues during this, but I was able to get this working after installing a new version of g++ through Homebrew (g++).

I am using SDL for drawing graphics. You can use the steps here to setup SDL on MacOS.

I use libpng to convert the SDL texture I render to into a PNG. See SDLRenderer::save_png(string filename). The render texture is drawn to an SDL_Surface, where the pixel data can be read and saved.

About

A raytracer built during my the Fall 2018 semester of UIUC's CS419: Production Computer Graphics. Built in C/C++, and supports OpenCL (realtime raytracing) on compatible devices with limited rendering features.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published