~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/GuestHost/OpenGL/state_tracker/state_texture.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
624
624
        }
625
625
}
626
626
 
 
627
static void crStateTextureCheckFBOAPs(CRFramebufferObject *pFBO, GLuint texture)
 
628
{
 
629
    GLuint u;
 
630
    CRFBOAttachmentPoint *ap;
 
631
 
 
632
    if (!pFBO) return;
 
633
 
 
634
    for (u=0; u<CR_MAX_COLOR_ATTACHMENTS; ++u)
 
635
    {
 
636
        ap = &pFBO->color[u];
 
637
        if (ap->type==GL_TEXTURE && ap->name==texture)
 
638
        {
 
639
            crStateFramebufferTexture1DEXT(GL_FRAMEBUFFER_EXT, u+GL_COLOR_ATTACHMENT0_EXT, 0, 0, 0);
 
640
        }
 
641
    }
 
642
 
 
643
    ap = &pFBO->depth;
 
644
    if (ap->type==GL_TEXTURE && ap->name==texture)
 
645
    {
 
646
        crStateFramebufferTexture1DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, 0, 0, 0);
 
647
    }
 
648
 
 
649
    ap = &pFBO->stencil;
 
650
    if (ap->type==GL_TEXTURE && ap->name==texture)
 
651
    {
 
652
        crStateFramebufferTexture1DEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, 0, 0, 0);
 
653
    }
 
654
}
 
655
 
627
656
void STATE_APIENTRY crStateDeleteTextures(GLsizei n, const GLuint *textures) 
628
657
{
629
658
        CRContext *g = GetCurrentContext();
691
720
                                }
692
721
#endif
693
722
                        }
 
723
 
 
724
#ifdef CR_EXT_framebuffer_object
 
725
            crStateTextureCheckFBOAPs(g->framebufferobject.drawFB, name);
 
726
            crStateTextureCheckFBOAPs(g->framebufferobject.readFB, name);
 
727
#endif
694
728
                        crStateDeleteTextureObject(tObj);
695
729
                }
696
730
        }