OpenShadingLanguage
OpenShadingLanguage copied to clipboard
Array of struct not allowed as parameters
Problem
Posting this as a result of this comment made by Larry.
Not sure this is really a problem, but Larry thought it might be.
Currently this generates a compile error.
struct textureresource
{
string filename;
string colorspace;
};
shader test_shader
(
textureresource files[2] = {{"",""},{"",""}},
output float out = 0
)
{}
generates the following compile error.
> oslc test.osl
test.osl:9: error: array of struct are not allowed as parameters
FAILED test.osl
Steps to Reproduce
- compile code above.
Versions
- OSL branch/version: 1.13.8
- OS: macOS
- C++ compiler:
- LLVM version: 17.0.6
- OIIO version: 2.5.9.0