updated Makefile to use -O1 in CXXFLAGS instead of -O3; -O2 and above currently break the app

git-svn-id: svn://anubis/fart/trunk@61 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop 2009-01-28 18:51:14 +00:00
parent ca3087eac5
commit a52b456bfa
3 changed files with 3 additions and 5 deletions

View File

@ -5,7 +5,7 @@ export CPPFLAGS += -I"$(shell cd)"
else else
export CPPFLAGS += -I"$(shell pwd)" export CPPFLAGS += -I"$(shell pwd)"
endif endif
export CXXFLAGS := -Wall -O3 export CXXFLAGS := -Wall -O1
all: $(TARGET) all: $(TARGET)

View File

@ -196,8 +196,7 @@ vector<Scene::ShapeDistance> Scene::getRayHits(const Ray & ray)
{ {
minSolidDist = intersect_dist; minSolidDist = intersect_dist;
} }
if (minSolidDist == 0.0 if (minSolidDist == 0.0 || minSolidDist >= intersect_dist)
|| minSolidDist >= intersect_dist)
{ {
hits.push_back(ShapeDistance(*it, intersect_dist)); hits.push_back(ShapeDistance(*it, intersect_dist));
} }

View File

@ -38,9 +38,8 @@ Shape::IntersectList Sphere::intersect(const Ray & ray)
Vector Sphere::getNormalAt(const Vector & pt) Vector Sphere::getNormalAt(const Vector & pt)
{ {
Vector pt_inv = m_inverse.transform_point(pt); Vector normal = m_inverse.transform_point(pt);
Vector normal = pt_inv;
normal.normalize(); normal.normalize();
return m_transform.transform_normal(normal); return m_transform.transform_normal(normal);