~ubuntu-branches/ubuntu/hardy/kdeartwork/hardy-backports

« back to all changes in this revision

Viewing changes to kscreensaver/kdesavers/Flux.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-02-14 12:27:06 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20080214122706-hfu103z9lyvj05g5
Tags: 4:3.5.9-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
454
454
 
455
455
    if(dBlur)   // partially
456
456
    {
 
457
        int viewport[4];
 
458
        glGetIntegerv(GL_VIEWPORT, viewport);
 
459
        float viewRatio = float(viewport[2]) / float(viewport[3]);
 
460
 
457
461
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
458
462
        glEnable(GL_BLEND);
459
463
        glDisable(GL_DEPTH_TEST);
460
464
        glColor4f(0.0f, 0.0f, 0.0f, 0.5f - (float(sqrt(sqrt(double(dBlur)))) * 0.15495f));
461
465
        glBegin(GL_TRIANGLE_STRIP);
462
 
            glVertex3f(-5.0f, -4.0f, 0.0f);
463
 
            glVertex3f(5.0f, -4.0f, 0.0f);
464
 
            glVertex3f(-5.0f, 4.0f, 0.0f);
465
 
            glVertex3f(5.0f, 4.0f, 0.0f);
 
466
            glVertex3f(-3.0f * viewRatio, -3.0f, 0.0f);
 
467
            glVertex3f(3.0f * viewRatio, -3.0f, 0.0f);
 
468
            glVertex3f(-3.0f * viewRatio, 3.0f, 0.0f);
 
469
            glVertex3f(3.0f * viewRatio, 3.0f, 0.0f);
466
470
        glEnd();
467
471
    }
468
472
    else  // completely