~ubuntu-branches/ubuntu/oneiric/nux/oneiric

« back to all changes in this revision

Viewing changes to Nux/ClientArea.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-06-22 17:16:16 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20110622171616-3cyhhiwsb6ga9d30
Tags: 1.0.2-0ubuntu1
* New upstream release.
* Cherry-pick a fix for FTBFS with -fpermissive
* debian/control:
  - add new libxdamage-dev and libxcomposite-dev build-dep
  - add new libboost1.42-dev dep as well, should be transitionned to 1.46 once
    compiz is transitionned as well
* remove debian/patches/01_build_with_gcc46.patch as included upstream
* debian/rules:
  - disable google code tests while building
* debian/control, debian/rules, debian/libnux-1.0-common.install,
  debian/libnux-1.0-dev.install, debian/libnux-1.0-doc.install,
  debian/libnux-1.0-0.install:
  - change, prepare next ABI breakage and remove no more needed Breaks: with
    new soname bump
* libnux-1.0-common now replaces: libnux-0.9-common for the apport hook

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
    if (GetWindowThread ()->GetWindow().HasFrameBufferSupport() )
51
51
    {
52
 
      m_FrameBufferObject = GetGpuDevice()->CreateFrameBufferObject();
53
 
      m_MainColorRT = GetGpuDevice()->CreateSystemCapableDeviceTexture (2, 2, 1, BITFMT_R8G8B8A8);
54
 
      m_MainDepthRT = GetGpuDevice()->CreateSystemCapableDeviceTexture (2, 2, 1, BITFMT_D24S8);
 
52
      m_FrameBufferObject = GetGraphicsDisplay()->GetGpuDevice()->CreateFrameBufferObject();
 
53
      m_MainColorRT = GetGraphicsDisplay()->GetGpuDevice()->CreateSystemCapableDeviceTexture (2, 2, 1, BITFMT_R8G8B8A8);
 
54
      m_MainDepthRT = GetGraphicsDisplay()->GetGpuDevice()->CreateSystemCapableDeviceTexture (2, 2, 1, BITFMT_D24S8);
55
55
    }
56
56
  }
57
57
 
64
64
    long ret = TraverseInfo;
65
65
 
66
66
//     // A is obtained from GfxContext. So A dimension's are in relative window coordinates.
67
 
//     Rect A = GetThreadGraphicsContext()->GetClippingRegion();
 
67
//     Rect A = GetGraphicsDisplay()->GetGraphicsEngine()->GetClippingRegion();
68
68
//     Rect B = Rect(GetBaseX(), GetBaseY(), GetBaseWidth(), GetBaseHeight());
69
69
//     Rect C = A.intersect(B);
70
70
//     if((ievent.e_event == NUX_MOUSE_MOVE) && !HasMouseFocus())
104
104
      m_ctx.width_clipregion  = C.GetWidth();
105
105
      m_ctx.height_clipregion = C.GetHeight();
106
106
 
107
 
      ObjectPtr<IOpenGLFrameBufferObject> prevFBO = GetGpuDevice()->GetCurrentFrameBufferObject();
 
107
      ObjectPtr<IOpenGLFrameBufferObject> prevFBO = GetGraphicsDisplay()->GetGpuDevice()->GetCurrentFrameBufferObject();
108
108
 
109
109
      if ( (m_FrameBufferObject->GetWidth() != buffer_width) || (m_FrameBufferObject->GetHeight() != buffer_height) )
110
110
      {
111
111
        m_FrameBufferObject->FormatFrameBufferObject (buffer_width, buffer_height, BITFMT_R8G8B8A8);
112
 
        m_MainColorRT = GetGpuDevice()->CreateSystemCapableDeviceTexture (buffer_width, buffer_height, 1, BITFMT_R8G8B8A8);
113
 
        m_MainDepthRT = GetGpuDevice()->CreateSystemCapableDeviceTexture (buffer_width, buffer_height, 1, BITFMT_D24S8);
 
112
        m_MainColorRT = GetGraphicsDisplay()->GetGpuDevice()->CreateSystemCapableDeviceTexture (buffer_width, buffer_height, 1, BITFMT_R8G8B8A8);
 
113
        m_MainDepthRT = GetGraphicsDisplay()->GetGpuDevice()->CreateSystemCapableDeviceTexture (buffer_width, buffer_height, 1, BITFMT_D24S8);
114
114
      }
115
115
 
116
116
      m_FrameBufferObject->SetRenderTarget (0, m_MainColorRT->GetSurfaceLevel (0) );
140
140
        texxform0.uwrap = TEXWRAP_CLAMP;
141
141
        texxform0.vwrap = TEXWRAP_CLAMP;
142
142
        texxform0.FlipVCoord (true);
143
 
        GetThreadGraphicsContext()->QRP_1Tex (x, y, w, h, m_MainColorRT, texxform0, Color (Colors::White) );
 
143
        GetGraphicsDisplay()->GetGraphicsEngine()->QRP_1Tex (x, y, w, h, m_MainColorRT, texxform0, Color (color::White) );
144
144
      }
145
145
 
146
146
      // go back to 2D in case that was changed by the client.