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

v2.0x ospray::cpp::Volume bug #381

Closed StasJ closed 4 years ago

StasJ commented 4 years ago

Running the code below:

int s = 64;
vector<float> data(s*s*s, 0);
ospray::cpp::Volume volume("structured_volume");
volume.setParam("voxelData", ospray::cpp::Data(data));
volume.setParam("voxelType", (int)OSP_FLOAT);
volume.setParam("dimensions", vec3i(s, s, s));
volume.setParam("gridOrigin", vec3i(0,0,0));
volume.setParam("gridSpacing", vec3f(1.f/s, 1.f/s, 1.f/s));
volume.commit();

Yields:

#ospray: trying to look up volume type 'structured_volume' for the first time
ospray::volume::VKLSharedStructuredVolume: found unused (or of wrong data type) parameter 'voxelData'
ospray::volume::VKLSharedStructuredVolume: found unused (or of wrong data type) parameter 'voxelType'
ospray::volume::VKLSharedStructuredVolume: found unused (or of wrong data type) parameter 'dimensions'
ospray::volume::VKLSharedStructuredVolume: found unused (or of wrong data type) parameter 'gridOrigin'
ospray::volume::VKLSharedStructuredVolume: found unused (or of wrong data type) parameter 'gridSpacing'

Despite it stating, for example, that "dimensions" is an invalid parameter, if I remove it the program will crash.

I am building off of the latest release-2.0x branch.

jeffamstutz commented 4 years ago

The way we report unused parameters was reporting false-positives for parameters we forward to VKL. I have this fixed on a cleanup branch that is under internal review. I'll report in here when this is fixed on release-2.0.x.

jeffamstutz commented 4 years ago

This was fixed in a219dc61, which is now merged to release-2.0.x.