mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.88k stars 1.19k forks source link

`imgtool` does not compile with `typedef SampledSpectrum Spectrum` #138

Closed ottobonn closed 7 years ago

ottobonn commented 7 years ago

Using typedef SampledSpectrum Spectrum in pbrt.h, imgtool fails to compile with

imgtool.cpp:729:26: error: no match for ‘operator=’ (operand types are ‘pbrt::RGBSpectrum’ and ‘pbrt::SampledSpectrum’)
             image[i] = Spectrum::FromRGB(rgb);

The image contains RGBSpectrum, so my proposed fix is to make the spectrum type explicit:

 image[i] = RGBSpectrum::FromRGB(rgb);
ottobonn commented 7 years ago

Oops; already fixed. My version of pbrt is out of date. Please disregard :)