~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
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: james.westby@ubuntu.com-20110622171616-49405ntrtnxfcpjj
Tags: upstream-1.0.2
ImportĀ upstreamĀ versionĀ 1.0.2

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.