RenderKit / ospray

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

Mesh Index Message Correction #561

Closed tarkpate closed 12 months ago

tarkpate commented 1 year ago

The Mesh class supports both triangle and quad meshes. The type is inferred through the "index" array being of type vec3ui or vec4ui. However, when no data is present, the error message only mentions vec4ui. This change is related to an issue from Ospray Anari.

I've added a check to see if any data is present beforehand. If not, the error message now states that vec3ui or vec4ui is allowed.

Old message: [ERROR] ospray::Mesh must have 'index' 1D array with element type vec4ui

New message: [ERROR] ospray::Mesh must have 'index' 1D array with element type vec3ui for triangle meshes or vec4ui for quad meshes.

johguenther commented 12 months ago

superseded by 2fc5e250a29045a75d0eea3c5b98b8e12efd3605