5#include <ospray/ospray_util.h>
18VTK_ABI_NAMESPACE_BEGIN
58 return OSP_TEXTURE_RA8;
63 return OSP_TEXTURE_FORMAT_INVALID;
78 static bool once =
false;
81 ret =
static_cast<RTWError>(ospInit(
nullptr,
nullptr));
82 OSPDevice device = ospGetCurrentDevice();
85 std::runtime_error(
"OSPRay device could not be fetched!");
87 ospDeviceSetErrorCallback(device, [](
void *, OSPError,
const char *errorDetails) {
88 std::cerr <<
"OSPRay ERROR: " << errorDetails << std::endl;
126 ospCopyData1D(shared, data, 0);
129 return reinterpret_cast<RTWData>(data);
133 OSPData data = ospNewData2D(
static_cast<OSPDataType>(dataType), numElements, numElements2);
137 ospCopyData2D(shared, data, 0, 0);
140 return reinterpret_cast<RTWData>(data);
148 ospCopyData(shared, data, 0, 0, 0);
151 return reinterpret_cast<RTWData>(data);
180 uint32_t numItems3)
override
183 numItems1, numItems2, numItems3));
198#if OSPRAY_VERSION_MAJOR < 3
283#if OSPRAY_VERSION_MAJOR < 3
302#if OSPRAY_VERSION_MAJOR < 3
311#if OSPRAY_VERSION_MAJOR < 3
361 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
void SetUInt(RTWObject object, const char *id, uint32_t x) override
void SetLinear2f(RTWObject object, const char *id, float x, float y, float z, float w) 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
RTWMaterial NewMaterial(const char *material_type) 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
void SetBox1f(RTWObject object, const char *id, float x, float y) 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
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 *)