From Farshild Lashkari, "Attached is a simple patch that avoids the depth write pass in Text::renderWithDelayedDepthWrites if the current osg::State object has GL_DEPTH_TEST disabled."
This commit is contained in:
parent
43483408f3
commit
6d1ba5b06d
@ -1601,6 +1601,12 @@ void Text::renderOnlyForegroundText(osg::State& state, const osg::Vec4& colorMul
|
||||
|
||||
void Text::renderWithDelayedDepthWrites(osg::State& state, const osg::Vec4& colorMultiplier) const
|
||||
{
|
||||
// If depth testing is disabled, then just render text as normal
|
||||
if( !state.getLastAppliedMode(GL_DEPTH_TEST) ) {
|
||||
drawTextWithBackdrop(state,colorMultiplier);
|
||||
return;
|
||||
}
|
||||
|
||||
//glPushAttrib( _enableDepthWrites ? (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) : GL_DEPTH_BUFFER_BIT);
|
||||
// Render to color buffer without writing to depth buffer.
|
||||
glDepthMask(GL_FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user