~vanvugt/compiz/fix-1056615

« back to all changes in this revision

Viewing changes to plugins/opengl/src/paint.cpp

  • Committer: Tarmac
  • Author(s): Sam Spilsbury, Daniel van Vugt
  • Date: 2012-10-09 03:44:09 UTC
  • mfrom: (3409.1.12 fix-1060804)
  • Revision ID: tarmac-20121009034409-6bhq23duk31258d3
Fix numerous problems with invalid C/C++ code that prevent us from building
with clang/clang++.
(LP: #1060804). Fixes: https://bugs.launchpad.net/bugs/1060804. Approved by Daniel van Vugt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
657
657
    WRAPABLE_HND_FUNCTN (glPaintCompositedOutput, region, fbo, mask)
658
658
 
659
659
    GLMatrix sTransform;
660
 
    std::vector<GLfloat> vertexData;
661
 
    std::vector<GLfloat> textureData;
662
660
    const GLTexture::Matrix & texmatrix = fbo->tex ()->matrix ();
663
661
    GLVertexBuffer *streamingBuffer = GLVertexBuffer::streamingBuffer ();
664
662
 
671
669
        GLfloat ty1 = 1.0 - COMP_TEX_COORD_Y (texmatrix, 0.0f);
672
670
        GLfloat ty2 = 1.0 - COMP_TEX_COORD_Y (texmatrix, screen->height ());
673
671
 
674
 
        vertexData = {
 
672
        const GLfloat vertexData[] = {
675
673
            0.0f,                    0.0f,                     0.0f,
676
674
            0.0f,                    (float)screen->height (), 0.0f,
677
675
            (float)screen->width (), 0.0f,                     0.0f,
681
679
            (float)screen->width (), 0.0f,                     0.0f,
682
680
        };
683
681
 
684
 
        textureData = {
 
682
        const GLfloat textureData[] = {
685
683
            tx1, ty1,
686
684
            tx1, ty2,
687
685
            tx2, ty1,
705
703
            GLfloat ty1 = 1.0 - COMP_TEX_COORD_Y (texmatrix, pBox->y1);
706
704
            GLfloat ty2 = 1.0 - COMP_TEX_COORD_Y (texmatrix, pBox->y2);
707
705
 
708
 
            vertexData = {
 
706
            const GLfloat vertexData[] = {
709
707
                (float)pBox->x1, (float)pBox->y1, 0.0f,
710
708
                (float)pBox->x1, (float)pBox->y2, 0.0f,
711
709
                (float)pBox->x2, (float)pBox->y1, 0.0f,
715
713
                (float)pBox->x2, (float)pBox->y1, 0.0f,
716
714
            };
717
715
 
718
 
            textureData = {
 
716
            const GLfloat textureData[] = {
719
717
                tx1, ty1,
720
718
                tx1, ty2,
721
719
                tx2, ty1,