From 396c12ee73193f4ac3665ecac2f634fc0b046697 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 8 Dec 2011 16:46:21 +0000 Subject: Fixes for unsafe string handling, variable scoping errors. --- nGenEx/Polygon.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nGenEx/Polygon.cpp') diff --git a/nGenEx/Polygon.cpp b/nGenEx/Polygon.cpp index 419d3a5..d5c581f 100644 --- a/nGenEx/Polygon.cpp +++ b/nGenEx/Polygon.cpp @@ -701,7 +701,7 @@ Material::GetThumbColor(int i, int j, int size) // anisotropic diffuse lighting if (brilliance >= 0) { - diffuse = pow(diffuse, brilliance); + diffuse = pow(diffuse, (double)brilliance); } // forward lighting @@ -713,7 +713,7 @@ Material::GetThumbColor(int i, int j, int size) if (power > 0) { double spec = ((nrm * 2*(nrm*light) - light) * eye); if (spec > 0.01) { - spec = pow(spec, power); + spec = pow(spec, (double)power); c += cs * (white * spec); } } @@ -730,8 +730,8 @@ Material::GetThumbColor(int i, int j, int size) double spec = ((nrm * 2*(nrm*light) - light) * eye); if (spec > 0.01) { - spec = pow(spec, power); - c += cs * (white * spec) * 0.7; + spec = pow(spec, (double)power); + c += cs * (white * spec) * 0.7; } } } -- cgit v1.1