~mc-return/compiz/compiz.merge-fix1070233-fix1070297-fix1070301-Resizeinfo

« back to all changes in this revision

Viewing changes to plugins/text/src/text.cpp

Re-added missing glEnable (GL_BLEND); and glDisable (GL_BLEND); calls to the OpenGL codepath to fix the text plugin's missing transparency.
Those got lost during the big GLES merge.
(LP: #1042132). Fixes: https://bugs.launchpad.net/bugs/1042132. Approved by Daniel van Vugt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
492
492
                float y,
493
493
                float alpha) const
494
494
{
 
495
    GLboolean  wasBlend;
495
496
    GLint      oldBlendSrc, oldBlendDst;
496
497
    GLushort        colorData[4];
497
498
    GLfloat         textureData[8];
510
511
#else
511
512
    glGetIntegerv (GL_BLEND_SRC, &oldBlendSrc);
512
513
    glGetIntegerv (GL_BLEND_DST, &oldBlendDst);
 
514
 
 
515
    wasBlend = glIsEnabled (GL_BLEND);
 
516
    if (!wasBlend)
 
517
        glEnable (GL_BLEND);
513
518
#endif
514
519
 
515
520
    glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
564
569
    glBlendFuncSeparate (oldBlendSrc, oldBlendDst,
565
570
                         oldBlendSrcAlpha, oldBlendDstAlpha);
566
571
#else
 
572
    if (!wasBlend)
 
573
        glDisable (GL_BLEND);
567
574
    glBlendFunc (oldBlendSrc, oldBlendDst);
568
575
#endif
569
576
}