OWL
OptiX7 Wrapper Library
impl.cpp File Reference
#include <owl/owl.h>
#include "APIContext.h"
#include "APIHandle.h"
#include "owl/common/parallel/parallel_for.h"
#include "Triangles.h"
#include "UserGeom.h"
#include "InstanceGroup.h"

Namespaces

 owl
 

Macros

#define LOG_API_CALL()   /* ignore */
 
#define LOG(message)
 
#define LOG_OK(message)
 
#define FATAL(error)   { std::cerr << "FATAL Error: " << error << std::endl; exit(1); }
 
#define _OWL_SET_HELPER(stype, abb)
 

Functions

OWL_API OWLContext owl::owlContextCreate (int32_t *requestedDeviceIDs, int numRequestedDevices)
 
APIContext::SP owl::checkGet (OWLContext _context)
 
OWL_API CUstream owl::owlContextGetStream (OWLContext _context, int deviceID)
 
OWL_API OptixDeviceContext owl::owlContextGetOptixContext (OWLContext _context, int deviceID)
 
OWL_API void owl::owlContextSetRayTypeCount (OWLContext _context, size_t numRayTypes)
 
OWL_API void owl::owlSetMaxInstancingDepth (OWLContext _context, int32_t maxInstanceDepth)
 
OWL_API void owl::owlEnableMotionBlur (OWLContext _context)
 
OWL_API void owl::owlBuildSBT (OWLContext _context, OWLBuildSBTFlags flags)
 
OWL_API void owl::owlBuildPrograms (OWLContext _context)
 
OWL_API void owl::owlBuildPipeline (OWLContext _context)
 
OWL_API void owl::owlAsyncLaunch2D (OWLRayGen _rayGen, int dims_x, int dims_y, OWLLaunchParams _launchParams)
 
OWL_API void owl::owlLaunch2D (OWLRayGen _rayGen, int dims_x, int dims_y, OWLLaunchParams _launchParams)
 
OWL_API void owl::owlLaunchSync (OWLLaunchParams _launchParams)
 
OWL_API void owl::owlRayGenLaunch2D (OWLRayGen _rayGen, int dims_x, int dims_y)
 
OWL_API int32_t owl::owlGetDeviceCount (OWLContext _context)
 
template<typename T >
OWLVariable owl::getVariableHelper (APIHandle *handle, const char *varName)
 
OWL_API OWLVariable owl::owlGeomGetVariable (OWLGeom _geom, const char *varName)
 
OWL_API OWLVariable owl::owlRayGenGetVariable (OWLRayGen _prog, const char *varName)
 
OWL_API OWLVariable owl::owlMissProgGetVariable (OWLMissProg _prog, const char *varName)
 
OWL_API OWLVariable owl::owlParamsGetVariable (OWLParams _prog, const char *varName)
 
std::vector< OWLVarDeclowl::checkAndPackVariables (const OWLVarDecl *vars, int numVars)
 
OWL_API OWLRayGen owl::owlRayGenCreate (OWLContext _context, OWLModule _module, const char *programName, size_t sizeOfVarStruct, OWLVarDecl *vars, int numVars)
 
OWL_API OWLParams owl::owlParamsCreate (OWLContext _context, size_t sizeOfVarStruct, OWLVarDecl *vars, int numVars)
 
OWL_API void owl::owlMissProgSet (OWLContext _context, int rayType, OWLMissProg _miss)
 
OWL_API OWLMissProg owl::owlMissProgCreate (OWLContext _context, OWLModule _module, const char *programName, size_t sizeOfVarStruct, OWLVarDecl *vars, int numVars)
 
OWL_API OWLGroup owl::owlTrianglesGeomGroupCreate (OWLContext _context, size_t numGeometries, OWLGeom *initValues)
 
OWL_API OWLGroup owl::owlUserGeomGroupCreate (OWLContext _context, size_t numGeometries, OWLGeom *initValues)
 
OWL_API OWLGroup owl::owlInstanceGroupCreate (OWLContext _context, size_t numInstances, const OWLGroup *_initGroups OWL_IF_CPP(=nullptr), const uint32_t *initInstanceIDs OWL_IF_CPP(=nullptr), const float *initTransforms OWL_IF_CPP(=nullptr), OWLMatrixFormat matrixFormat=OWL_MATRIX_FORMAT_OWL)
 
OWL_API void owl::owlContextDestroy (OWLContext _context)
 
OWL_API OWLBuffer owl::owlDeviceBufferCreate (OWLContext _context, OWLDataType type, size_t count, const void *init)
 
OWL_API OWLTexture owl::owlTexture2DCreate (OWLContext _context, OWLTexelFormat texelFormat, uint32_t size_x, uint32_t size_y, const void *texels, OWLTextureFilterMode filterMode, OWLTextureAddressMode addressMode, uint32_t linePitchInBytes)
 
OWL_API CUtexObject owl::owlTextureGetObject (OWLTexture _texture, int deviceID)
 
OWL_API void owl::owlTexture2DDestroy (OWLTexture _texture)
 
OWL_API OWLBuffer owl::owlHostPinnedBufferCreate (OWLContext _context, OWLDataType type, size_t count)
 
OWL_API OWLBuffer owl::owlManagedMemoryBufferCreate (OWLContext _context, OWLDataType type, size_t count, const void *init)
 
OWL_API OWLBuffer owl::owlGraphicsBufferCreate (OWLContext _context, OWLDataType type, size_t count, cudaGraphicsResource_t resource)
 
OWL_API void owl::owlGraphicsBufferMap (OWLBuffer _buffer)
 
OWL_API void owl::owlGraphicsBufferUnmap (OWLBuffer _buffer)
 
OWL_API const void * owl::owlBufferGetPointer (OWLBuffer _buffer, int deviceID)
 
OWL_API OptixTraversableHandle owl::owlGroupGetTraversable (OWLGroup _group, int deviceID)
 
OWL_API CUstream owl::owlParamsGetCudaStream (OWLLaunchParams _lp, int deviceID)
 
OWL_API void owl::owlBufferResize (OWLBuffer _buffer, size_t newItemCount)
 
OWL_API void owl::owlBufferUpload (OWLBuffer _buffer, const void *hostPtr)
 
OWL_API void owl::owlBufferDestroy (OWLBuffer _buffer)
 
OWL_API OWLGeomType owl::owlGeomTypeCreate (OWLContext _context, OWLGeomKind kind, size_t varStructSize, OWLVarDecl *vars, int numVars)
 
OWL_API OWLGeom owl::owlGeomCreate (OWLContext _context, OWLGeomType _geometryType)
 
OWL_API void owl::owlGeomSetPrimCount (OWLGeom _geom, size_t primCount)
 
OWL_API OWLModule owl::owlModuleCreate (OWLContext _context, const char *ptxCode)
 
template<typename T >
void owl::releaseObject (APIHandle *handle)
 
OWL_API void owl::owlBufferRelease (OWLBuffer buffer)
 
OWL_API void owl::owlModuleRelease (OWLModule module)
 
OWL_API void owl::owlGroupRelease (OWLGroup group)
 
OWL_API void owl::owlRayGenRelease (OWLRayGen handle)
 
OWL_API void owl::owlVariableRelease (OWLVariable variable)
 
OWL_API void owl::owlGeomRelease (OWLGeom geometry)
 
OWL_API void owl::owlTrianglesSetVertices (OWLGeom _triangles, OWLBuffer _buffer, size_t count, size_t stride, size_t offset)
 
OWL_API void owl::owlTrianglesSetMotionVertices (OWLGeom _triangles, size_t numKeys, OWLBuffer *vertexArrays, size_t count, size_t stride, size_t offset)
 
OWL_API void owl::owlGroupBuildAccel (OWLGroup _group)
 
OWL_API void owl::owlGroupRefitAccel (OWLGroup _group)
 
OWL_API void owl::owlTrianglesSetIndices (OWLGeom _triangles, OWLBuffer _buffer, size_t count, size_t stride, size_t offset)
 
OWL_API void owl::owlGeomTypeSetClosestHit (OWLGeomType _geometryType, int rayType, OWLModule _module, const char *progName)
 
OWL_API void owl::owlGeomTypeSetAnyHit (OWLGeomType _geometryType, int rayType, OWLModule _module, const char *progName)
 
OWL_API void owl::owlGeomTypeSetIntersectProg (OWLGeomType _geometryType, int rayType, OWLModule _module, const char *progName)
 
OWL_API void owl::owlGeomTypeSetBoundsProg (OWLGeomType _geometryType, OWLModule _module, const char *progName)
 
template<typename T >
void owl::setVariable (APIHandle *handle, const T &value)
 
OWL_API void owl::owlVariableSetGroup (OWLVariable _variable, OWLGroup _group)
 
OWL_API void owl::owlVariableSetTexture (OWLVariable _variable, OWLTexture _texture)
 
OWL_API void owl::owlVariableSetBuffer (OWLVariable _variable, OWLBuffer _buffer)
 
OWL_API void owl::owlVariableSetRaw (OWLVariable _variable, const void *valuePtr)
 
OWL_API void owl::owlVariableSetPointer (OWLVariable _variable, const void *valuePtr)
 
OWL_API void owl::owlInstanceGroupSetChild (OWLGroup _group, int whichChild, OWLGroup _child)
 
OWL_API void owl::owlInstanceGroupSetTransforms (OWLGroup _group, uint32_t timeStep, const float *floatsForThisStimeStep, OWLMatrixFormat matrixFormat)
 
OWL_API void owl::owlInstanceGroupSetInstanceIDs (OWLGroup _group, const uint32_t *instanceIDs)
 
OWL_API void owl::owlInstanceGroupSetTransform (OWLGroup _group, int whichChild, const float *floats, OWLMatrixFormat matrixFormat)
 

Macro Definition Documentation

◆ _OWL_SET_HELPER

#define _OWL_SET_HELPER (   stype,
  abb 
)

◆ FATAL

#define FATAL (   error)    { std::cerr << "FATAL Error: " << error << std::endl; exit(1); }

◆ LOG

#define LOG (   message)
Value:
if (Context::logging()) \
std::cout \
<< "#owl: " \
<< message \
<< OWL_TERMINAL_DEFAULT << std::endl

◆ LOG_API_CALL

#define LOG_API_CALL ( )    /* ignore */

◆ LOG_OK

#define LOG_OK (   message)
Value:
if (Context::logging()) \
std::cout \
<< "#owl: " \
<< message \
<< OWL_TERMINAL_DEFAULT << std::endl
OWL_TERMINAL_LIGHT_BLUE
#define OWL_TERMINAL_LIGHT_BLUE
Definition: owl-common.h:121
OWL_TERMINAL_BLUE
#define OWL_TERMINAL_BLUE
Definition: owl-common.h:120
OWL_TERMINAL_DEFAULT
#define OWL_TERMINAL_DEFAULT
Definition: owl-common.h:123