diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp
index 84d31fa58..322a74791 100644
--- a/src/osgUtil/CullVisitor.cpp
+++ b/src/osgUtil/CullVisitor.cpp
@@ -24,8 +24,6 @@ using namespace osgUtil;
#define DEG2RAD(x) ((x)*M_PI/180.0)
-static bool g_debugging2 = false;
-
inline float MAX_F(float a, float b)
{ return a>b?a:b; }
inline int EQUAL_F(float a, float b)
@@ -876,13 +874,6 @@ void CullVisitor::apply(Geode& node)
}
Vec3 delta_center = center-_tvs->_eyePoint;
- if (g_debugging2)
- {
- notify(INFO) << "center ["<
_lookVector.x()<<","<<_tvs->_lookVector.y()<<","<<_tvs->_lookVector.z()<<"]"<< std::endl;
- }
-
float depth;
switch(_tsm)
{
@@ -953,17 +944,17 @@ void CullVisitor::apply(Billboard& node)
Matrix* billboard_matrix = createOrReuseMatrix();
node.calcTransform(eye_local,up_local,pos,*billboard_matrix);
+ if (matrix)
+ {
+ billboard_matrix->postMult(*matrix);
+ }
+
StateSet* stateset = drawable->getStateSet();
bool isTransparent = stateset && stateset->getRenderingHint()==osg::StateSet::TRANSPARENT_BIN;
if (isTransparent)
{
- if (matrix)
- {
- billboard_matrix->mult(*billboard_matrix,*matrix);
- }
-
Vec3 center;
if (matrix)
{
@@ -975,13 +966,6 @@ void CullVisitor::apply(Billboard& node)
}
Vec3 delta_center = center-_tvs->_eyePoint;
- if (g_debugging2)
- {
- notify(INFO) << "center ["<_lookVector.x()<<","<<_tvs->_lookVector.y()<<","<<_tvs->_lookVector.z()<<"]"<< std::endl;
- }
-
float depth;
switch(_tsm)
{
@@ -1235,13 +1219,6 @@ void CullVisitor::apply(Impostor& node)
}
Vec3 delta_center = center-_tvs->_eyePoint;
- if (g_debugging2)
- {
- notify(INFO) << "center ["<_lookVector.x()<<","<<_tvs->_lookVector.y()<<","<<_tvs->_lookVector.z()<<"]"<< std::endl;
- }
-
float depth;
switch(_tsm)
{