This repository is a Ray tracing API for OpenGL applications implemented in C++ & OpenCL. Please see below link if you are interested in our work.
Lai, WH, Tang, CY & Chang, CF 2017, Ray tracing API integration for OpenGL applications. in V Skala (ed.), Posters Proceedings. May edn, vol. 2703, University of West Bohemia, pp. 1-5, 25th International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision, WSCG 2017, Plzen, Czech Republic
We provide a realtime ray tracing API (RTAPI) integration for OpenGL applications that can replace the original rendering pilepline (rasterization) with ray tracing by simply adding a few lines of code, and the algorithm behind in RTAPI is also fully parallelized by OpenCL.
These calls are commonly used in fixed function pipeline, you can simply include the RayTracing.h and these calls are automatically transformed to RTAPI. Note that the extension column represents some features only provided by RTAPI which legacy OpenGL does not support.
Buffer | Rendering | Capability | GLU (OpenGL Utility Library) |
Lighting | Extension |
---|---|---|---|---|---|
glGenBuffers | glVertexPointer | glEnableClientState | gluPerspective | glLightfv | rtMaterialEXT |
glBindBuffer | glColorPointer | glDisableClientState | gluLookAt | rtBuildKDtreeCurrentSceneEXT | |
glBufferData | glNormalPointer | glEnable | |||
glDrawArrays | glDisable | ||||
glFlush |
- OpenCL >= 1.2 and its Installable Client Driver (ICD)
- Windows 10 PC
- Using Intel iGPU, your Graphic driver is already included or you can update it from Intel Download Center.
- Using NVIDIA GPU, please install the latest NVIDIA Graphic Driver.
- Linux PC (Ubuntu >= 16.04)
- Using Intel iGPU, please install via this command
sudo apt install intel-opencl-icd
- Using NVIDIA GPU, please install via this command
sudo apt install nvidia-opencl-icd
- Using Intel iGPU, please install via this command
- Windows 10 PC
- CMake >= 3.7
- Git
- GCC (Linux)
- make (Linux)
- Visual Studio 2015 Update 3 or greater with the English language pack (Windows)
> git clone --recursive https://github.com/RuinedStar/Ray-Tracing-API-Integration.git
> cd Ray-Tracing-API-Integration
> cd vcpkg
> .\bootstrap-vcpkg.bat
> .\vcpkg.exe install --triplet x64-windows opencl assimp freeglut glew glm
- CMake-GUI or follow commands in Linux build section
- Double click raytracing.sln to open Visual Studio IDE and start to play it around!
> cd vcpkg
> ./bootstrap-vcpkg.sh
> ./vcpkg install --triplet x64-linux opencl assimp freeglut glew glm
> cd ..
> mkdir build
> cd build
> cmake ..
> make -j$(nproc)
My classmate, C.Y Tang
The College Advisor, C.F Chang