3#include <ospray/ospray_util.h>
55 return OSP_TEXTURE_RA8;
60 return OSP_TEXTURE_FORMAT_INVALID;
75 static bool once =
false;
78 ret =
static_cast<RTWError>(ospInit(
nullptr,
nullptr));
79 OSPDevice device = ospGetCurrentDevice();
82 std::runtime_error(
"OSPRay device could not be fetched!");
84#if OSPRAY_VERSION_MINOR > 1
85 ospDeviceSetErrorCallback(device, [](
void *, OSPError,
const char *errorDetails) {
86 std::cerr <<
"OSPRay ERROR: " << errorDetails << std::endl;
89 ospDeviceSetErrorFunc(device, [](OSPError,
const char *errorDetails) {
90 std::cerr <<
"OSPRay ERROR: " << errorDetails << std::endl;
129 ospCopyData1D(shared, data, 0);
132 return reinterpret_cast<RTWData>(data);
136 OSPData data = ospNewData2D(
static_cast<OSPDataType>(dataType), numElements, numElements2);
140 ospCopyData2D(shared, data, 0, 0);
143 return reinterpret_cast<RTWData>(data);
151 ospCopyData(shared, data, 0, 0, 0);
154 return reinterpret_cast<RTWData>(data);
183 uint32_t numItems3)
override
186 numItems1, numItems2, numItems3));
333 ospResetAccumulation(
reinterpret_cast<OSPFrameBuffer>(frameBuffer));
#define ospSetObjectAsData
#define OSP_TEXTURE_SRGBA
#define ospUnmapFrameBuffer
#define ospNewGeometricModel
#define ospNewVolumetricModel
#define OSP_TEXTURE_RGBA8
#define OSP_TEXTURE_RGB32F
#define ospNewSharedData2D
#define OSP_TEXTURE_RGBA32F
#define ospNewFrameBuffer
#define ospNewTransferFunction
#define ospNewSharedData3D
#define ospNewSharedData1D
#define ospMapFrameBuffer
struct RTWHandle * RTWData
struct RTWHandle * RTWCamera
struct RTWHandle * RTWObject
struct RTWHandle * RTWTexture
@ RTW_TEXTURE_FORMAT_INVALID
struct RTWHandle * RTWTransferFunction
@ RTW_DEPTH_NORMALIZATION
@ RTW_ANIMATED_PARAMETERIZATION
struct RTWHandle * RTWFrameBuffer
struct RTWHandle * RTWGroup
struct RTWHandle * RTWGeometry
struct RTWHandle * RTWVolume
struct RTWHandle * RTWVolumetricModel
struct RTWHandle * RTWMaterial
struct RTWHandle * RTWRenderer
struct RTWHandle * RTWLight
struct RTWHandle * RTWInstance
struct RTWHandle * RTWWorld
struct RTWHandle * RTWGeometricModel
const void * MapFrameBuffer(RTWFrameBuffer frameBuffer, const RTWFrameBufferChannel channel) override
float RenderFrame(RTWFrameBuffer frameBuffer, RTWRenderer renderer, RTWCamera camera, RTWWorld world) override
RTWTexture NewTexture(const char *type) override
RTWData NewSharedData1D(const void *sharedData, RTWDataType type, uint32_t numItems1) override
RTWInstance NewInstance(RTWGroup geometry) override
RTWData NewSharedData3D(const void *sharedData, RTWDataType type, uint32_t numItems1, uint32_t numItems2, uint32_t numItems3) override
RTWVolumetricModel NewVolumetricModel(RTWVolume volume) override
RTWRenderer NewRenderer(const char *type) override
RTWFrameBuffer NewFrameBuffer(const rtw::vec2i &size, const RTWFrameBufferFormat format, const uint32_t frameBufferChannels) override
RTWData NewCopyData2D(const void *source, RTWDataType dataType, size_t numElements, size_t numElements2) override
RTWGeometry NewGeometry(const char *type) override
void Commit(RTWObject object) override
int GetDepthTextureGL(RTWFrameBuffer) override
void SetObject(RTWObject object, const char *id, RTWObject other) override
void SetVec3i(RTWObject object, const char *id, int x, int y, int z) override
RTWData NewData(RTWDataType dataType, size_t numElements) override
void Release(RTWObject object) override
void UnmapFrameBuffer(const void *mapped, RTWFrameBuffer frameBuffer) override
RTWWorld NewWorld() override
void SetObjectAsData(RTWObject target, const char *id, RTWDataType type, RTWObject obj) override
RTWGeometricModel NewGeometricModel(RTWGeometry geometry) override
void SetParam(RTWObject object, const char *id, RTWDataType dataType, const void *mem) override
void SetVec2f(RTWObject object, const char *id, float x, float y) override
RTWVolume NewVolume(const char *type) override
RTWData NewCopyData1D(const void *source, RTWDataType dataType, size_t numElements) override
RTWMaterial NewMaterial(const char *renderer_type, const char *material_type) override
void FrameBufferClear(RTWFrameBuffer frameBuffer) override
void SetDepthNormalizationGL(RTWFrameBuffer, float, float) override
RTWData NewCopyData3D(const void *source, RTWDataType dataType, size_t numElements, size_t numElements2, size_t numElements3) override
RTWLight NewLight(const char *light_type) override
void SetBool(RTWObject object, const char *id, bool x) override
bool IsSupported(RTWFeature feature) const override
void SetString(RTWObject object, const char *id, const char *s) override
void SetVec4f(RTWObject object, const char *id, float x, float y, float z, float w) override
RTWGroup NewGroup() override
void SetVec3f(RTWObject object, const char *id, float x, float y, float z) override
void SetVec2i(RTWObject object, const char *id, int x, int y) override
RTWData NewSharedData2D(const void *sharedData, RTWDataType type, uint32_t numItems1, uint32_t numItems2) override
int GetColorTextureGL(RTWFrameBuffer) override
RTWCamera NewCamera(const char *type) override
void SetInt(RTWObject object, const char *id, int32_t x) override
void SetFloat(RTWObject object, const char *id, float x) override
RTWTransferFunction NewTransferFunction(const char *type) override
void RemoveParam(RTWObject object, const char *id) override
OSPFrameBufferFormat convert(RTWFrameBufferFormat format)
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)