Merge remote-tracking branch 'upstream/master' into MDI7

This commit is contained in:
Julien Valentin
2017-08-24 11:26:23 +02:00
108 changed files with 2569 additions and 415 deletions

View File

@@ -332,7 +332,7 @@ double IncrementalCompileOperation::CompileList::estimatedTimeForCompile(Compile
{
double estimateTime = 0.0;
for(CompileOps::const_iterator itr = _compileOps.begin();
itr != _compileOps.begin();
itr != _compileOps.end();
++itr)
{
estimateTime += (*itr)->estimatedTimeForCompile(compileInfo);

View File

@@ -468,21 +468,21 @@ namespace PlaneIntersectorUtils
if (numOnPlane==3)
{
// triangle lives wholy in the plane
// triangle lives wholly in the plane
OSG_NOTICE<<"3"<<std::endl;
return;
}
if (numOnPlane==2)
{
// one edge lives wholy in the plane
// one edge lives wholly in the plane
OSG_NOTICE<<"2"<<std::endl;
return;
}
if (numOnPlane==1)
{
// one point lives wholy in the plane
// one point lives wholly in the plane
OSG_NOTICE<<"1"<<std::endl;
return;
}

View File

@@ -1342,40 +1342,42 @@ void RenderStage::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& pr
if (_colorMask.valid()) _colorMask->apply(state);
else glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
if (_clearMask & GL_COLOR_BUFFER_BIT)
if (_clearMask != 0)
{
glClearColor( _clearColor[0], _clearColor[1], _clearColor[2], _clearColor[3]);
}
if (_clearMask & GL_COLOR_BUFFER_BIT)
{
glClearColor( _clearColor[0], _clearColor[1], _clearColor[2], _clearColor[3]);
}
if (_clearMask & GL_DEPTH_BUFFER_BIT)
{
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glClearDepth( _clearDepth);
#else
glClearDepthf( _clearDepth);
if (_clearMask & GL_DEPTH_BUFFER_BIT)
{
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glClearDepth( _clearDepth);
#else
glClearDepthf( _clearDepth);
#endif
glDepthMask ( GL_TRUE );
state.haveAppliedAttribute( osg::StateAttribute::DEPTH );
}
if (_clearMask & GL_STENCIL_BUFFER_BIT)
{
glClearStencil( _clearStencil);
glStencilMask ( ~0u );
state.haveAppliedAttribute( osg::StateAttribute::STENCIL );
}
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
if (_clearMask & GL_ACCUM_BUFFER_BIT)
{
glClearAccum( _clearAccum[0], _clearAccum[1], _clearAccum[2], _clearAccum[3]);
}
#endif
glDepthMask ( GL_TRUE );
state.haveAppliedAttribute( osg::StateAttribute::DEPTH );
glClear( _clearMask );
}
if (_clearMask & GL_STENCIL_BUFFER_BIT)
{
glClearStencil( _clearStencil);
glStencilMask ( ~0u );
state.haveAppliedAttribute( osg::StateAttribute::STENCIL );
}
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
if (_clearMask & GL_ACCUM_BUFFER_BIT)
{
glClearAccum( _clearAccum[0], _clearAccum[1], _clearAccum[2], _clearAccum[3]);
}
#endif
glClear( _clearMask );
#ifdef USE_SCISSOR_TEST
glDisable( GL_SCISSOR_TEST );
#endif