RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
1k stars 182 forks source link

ospSetObjectAsData no longer working? #375

Closed paulmelis closed 4 years ago

paulmelis commented 4 years ago

As far as I can tell 1875067dc4c56447452117521349609bef4e7e83 broke calls to ospSetObjectAsData. E.g.

ospSetObjectAsData(group, "geometry", OSP_GEOMETRIC_MODEL, gmodel);

now gives me a status message

OSPRAY STATUS: ospray::Group ignoring 'geometry' array with wrong element type (should be geometric_model)

and missing objects in the scene. I guess the geom model type is lost and the data gets passed as OSP_OBJECT (from the interception/faker lib in blospray):

{"arguments":{"id":"geometry","mem":94352387896512,"obj":94352387894656,"type":"OSP_OBJECT"},"call":"ospSetParam","timestamp":1572005236.965497}
paulmelis commented 4 years ago

https://github.com/ospray/ospray/blob/e06456e6ea35f59eaf8d4d7212bf42f3f306cb65/ospray/api/ospray_util_impl.cpp#L157-L164

leads to here it seems:

https://github.com/ospray/ospray/blob/e06456e6ea35f59eaf8d4d7212bf42f3f306cb65/ospray/include/ospray/ospray_cpp/Data.h#L179-L182

jeffamstutz commented 4 years ago

Yeah, I messed that up when I was adding more constructors to cpp::Data. I'll fix this today.

FYI: we are looking to remove ospray_util.h before the official release because the C++ wrappers are turning out to be far more convenient than ospray_util.h can possibly be (it is still only C99). We will keep them in the short term, though...but definitely something to keep in mind.

jeffamstutz commented 4 years ago

This is fixed on 32ab4ef1a (and is verified by changes made to ospTutorial.c).