Since the recent changes bringing renderOpaque, renderTransparant, overlays, etc., the LabelEngine triggers some bugs:
When LabelEngine is active, the yellow sphere of the navigatetool is no longer transparent.
When LabelEngine is active, only one of the molecules in a UnitCell gets rendered, the others are hidden. Moreover, the labelengine shows a transparency problem in that case.
I have added qDebug() to check the glPushMatrix/glPopMatrix calls in TextRenderer, and they look just fine. Therefore I suppose this might be a problem in the new "overlay" system (as LabelEngine is flagged as an overlay), which is why I assign this bug to you, Donald.
Logged In: YES
user_id=1317290
Originator: NO
I don't fully understand why this bug is occurring but I have found something that fixes the transparency problem.
If you add the following code to Painter's begin(GLWidget *widget) method transparency works while the text renderer is enabled:
if(d->textRenderer->isActive())
{
d->textRenderer->end();
}
Its probably a bit of a hacky fix but as I said, I don't understand the underlying code, I just stumbled across this while working on a new tool (more to come about that later). I assume someone else understands the code better and that this hacky fix might clue you in on what might be the underlying cause of the bug.
Hope this helps,
James & Ross
Logged In: YES
user_id=1500648
Originator: NO
TextRenderer::begin (push environment)
TextRenderer::drawText
glEnable(GL_BLEND) (new environment, say GL_BLEND)
TextRenderer::end (pop OLD environment, no GL_BLEND)
drawSphere()
So to fix the error i simply call TextRenderer::end after calling ::drawText. This is bad because that means for each call to draw text we are re-setting up our environment. Our painting system is a little off-whack and I think we need to remedy it a bit more. One of the problems is that you can change the GL environment in the rendering code, but actually, things like enabling transparency, etc should be handled by the GLPainter. Also, we can easily make it so you can instanciate your own GLPainter and just use a shared static variable. shrug I have fixed the problem temp but please leave this PR open.
Logged In: YES
user_id=1500648
Originator: NO
This has been resolved.
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).