a2flo / oclraster

Flexible Rasterizer in OpenCL
GNU General Public License v2.0
49 stars 5 forks source link

Flexible Rasterizer in OpenCL

This is the source code to my bachelor's thesis "Flexible Rasterizer in OpenCL":

This project implements an essentially OpenGL 2.0-level software graphics pipeline, called OCLRaster (short for OpenCL Rasterizer), with the addition of some unique features and functionality of more recent OpenGL versions, but also the exclusion of some other features. The pipeline is written and accelerated by OpenCL C on the device side and C++ on the host side, and is capable of running on all OpenCL 1.1 desktop hardware. This includes most modern GPUs and CPUs.

Among the main goals are to provide a simple host API and an easy way to program the vertex and fragment stage, with the direct intention of being similar to a hardware graphics pipeline and API, and accordingly requiring no modification of the pipeline. Both of these should allow for a rather uncomplicated migration of OpenGL programs.

In regard to the implemented features, this software pipeline supports fully programmable depth testing and blending, which are both not possible on today’s graphics hardware, instanced rendering, scissor testing, the previously mentioned vertex and fragment stage programmability, miscellaneous buffer objects in a simplified and unified way, 2D images (hardware accelerated formats and software emulation for unsupported formats), framebuffers and multiple render targets with less restrictions than hardware pipelines, and of course rendering with perspective and orthographic projection modes. Other OpenGL 2.0-level features are however not supported. These include stencil testing (which can however be partially simulated in software by simply using an additional framebuffer attachment), anti-aliasing, 1D and 3D images, occlusion querrying and all of the now obsolete legacy draw functions and modes. The reasons for this are not of any technical nature that would prevent their implementation, but rather due to the time constraints of this thesis/project.

The thesis can be found in the "etc" folder ("oclraster_thesis.pdf":https://github.com/a2flo/oclraster/blob/master/etc/oclraster_thesis.pdf?raw=true).

Software Requirements and Important Information:

Requirements:

Build Instructions:

on Linux and FreeBSD:

on Windows/MinGW:

on OS X:

Credits:

Relevant Links and Papers:

Screenshots: