Delta Rayopen source ray tracing engine
Instructions
Instructions
While I'd like to make a fancy dll eventually, currently you'll need to drop the source into your project. The driver.cpp file performs a basic DirectX initialization, and is a good starting point for most applications.
To use Delta Ray in your project:
- #include "Tracer.h"
- Create a Tracer object
- Create materials if needed (you can edit DRMaterials.cpp to do this easier)
- Create instances of the Drawable objects and LightSources you need.
- Use Tracer->Add() on each drawable or light source
- Create a BitMap object
- Call Tracer->Render(BitMap) to work the magic
- Bitmap shout now contain a D3D texture with the rendered image
In the project's current state, the easiest way to define a material is to edit DRMaterial.cpp. DRMaterial(int) takes an int and sets the material's qualities based on a switch. Most Drawables use this list. This will change in my rework.