Merge pull request #6686 from samcake/hdr

Graphics: Fix bad returned references which should be copied values
This commit is contained in:
Clément Brisset 2015-12-17 13:20:59 -08:00
commit 992cffd6d6

View file

@ -221,10 +221,10 @@ public:
const MaterialKey& getKey() const { return _key; }
void setEmissive(const Color& emissive, bool isSRGB = true);
const Color& getEmissive(bool SRGB = true) const { return (SRGB ? ColorUtils::toGamma22Vec3(_schemaBuffer.get<Schema>()._emissive) : _schemaBuffer.get<Schema>()._emissive); }
Color getEmissive(bool SRGB = true) const { return (SRGB ? ColorUtils::toGamma22Vec3(_schemaBuffer.get<Schema>()._emissive) : _schemaBuffer.get<Schema>()._emissive); }
void setDiffuse(const Color& diffuse, bool isSRGB = true);
const Color& getDiffuse(bool SRGB = true) const { return (SRGB ? ColorUtils::toGamma22Vec3(_schemaBuffer.get<Schema>()._diffuse) : _schemaBuffer.get<Schema>()._diffuse); }
Color getDiffuse(bool SRGB = true) const { return (SRGB ? ColorUtils::toGamma22Vec3(_schemaBuffer.get<Schema>()._diffuse) : _schemaBuffer.get<Schema>()._diffuse); }
void setMetallic(float metallic);
float getMetallic() const { return _schemaBuffer.get<Schema>()._metallic.x; }