12 #    ifndef SLOPTIXRAYTRACER_H 
   13 #        define SLOPTIXRAYTRACER_H 
   14 #        include <optix_types.h> 
   33     ~SLOptixRaytracer() 
override;
 
   38     virtual void setupOptix();
 
   47     virtual void renderImage(
bool updateTextureGL) 
override;
 
   51     void initCompileOptions();
 
   53     OptixModule             createModule(
string);
 
   54     OptixProgramGroup       createProgram(OptixProgramGroupDesc);
 
   55     OptixPipeline           createPipeline(OptixProgramGroup*, 
unsigned int);
 
   56     OptixShaderBindingTable createShaderBindingTable(
const SLVMesh&, 
const bool);
 
   58     SLOptixCudaBuffer<float4>    _imageBuffer  = SLOptixCudaBuffer<float4>();
 
   59     SLOptixCudaBuffer<ortParams> _paramsBuffer = SLOptixCudaBuffer<ortParams>();
 
   60     SLOptixCudaBuffer<ortLight>  _lightBuffer  = SLOptixCudaBuffer<ortLight>();
 
   62     OptixModule                 _cameraModule{};
 
   63     OptixModule                 _shadingModule{};
 
   64     OptixModuleCompileOptions   _module_compile_options{};
 
   65     OptixPipelineCompileOptions _pipeline_compile_options{};
 
   67     OptixTraversableHandle _handle{};
 
   70     SLOptixCudaBuffer<MissSbtRecord>              _missBuffer              = SLOptixCudaBuffer<MissSbtRecord>();
 
   71     SLOptixCudaBuffer<HitSbtRecord>               _hitBuffer               = SLOptixCudaBuffer<HitSbtRecord>();
 
   72     SLOptixCudaBuffer<RayGenClassicSbtRecord>     _rayGenClassicBuffer     = SLOptixCudaBuffer<RayGenClassicSbtRecord>();
 
   73     SLOptixCudaBuffer<RayGenDistributedSbtRecord> _rayGenDistributedBuffer = SLOptixCudaBuffer<RayGenDistributedSbtRecord>();
 
   75     OptixPipeline _pipeline{};
 
   77     OptixProgramGroup _pinhole_raygen_prog_group{};
 
   78     OptixProgramGroup _lens_raygen_prog_group{};
 
   79     OptixProgramGroup _orthographic_raygen_prog_group{};
 
   80     OptixProgramGroup _radiance_miss_group{};
 
   81     OptixProgramGroup _occlusion_miss_group{};
 
   82     OptixProgramGroup _radiance_hit_group{};
 
   83     OptixProgramGroup _occlusion_hit_group{};
 
   85     OptixShaderBindingTable _sbtClassic{};
 
   86     OptixShaderBindingTable _sbtDistributed{};
 
vector< SLMesh * > SLVMesh
 
Toplevel holder of the assets meshes, materials, textures and shaders.
 
Active or visible camera node class.
 
Defines a standard CG material with textures and a shader program.
 
Ray class with ray and intersection properties.
 
SLRaytracer hold all the methods for Whitted style Ray Tracing.
 
virtual void prepareImage()
 
SLbool renderClassic(SLSceneView *sv)
 
SLbool renderDistrib(SLSceneView *sv)
 
virtual void renderImage(bool updateTextureGL)
 
virtual void saveImage()
Saves the current RT image as PNG image.
 
The SLScene class represents the top level instance holding the scene structure.
 
SceneView class represents a dynamic real time 3D view onto the scene.