~unity-team/nux/nux.redirected-views

« back to all changes in this revision

Viewing changes to NuxGraphics/GraphicsEngine.cpp

  • Committer: Tarmac
  • Author(s): Jay Taoko
  • Date: 2012-09-18 14:21:37 UTC
  • mfrom: (660.1.2 nux.dash-to-preview)
  • Revision ID: tarmac-20120918142137-uvz785kmnt2s40qy
This branch introduces "Redirected Views" in Nux. Redirected views allows a view to be rendered inside its own texture and that texture is latter composited inside the main rendering.
This branch contains the required changes for redirected views. The opportunty was also taken to fix minor issues and introduce API changes.

== Core of the Redirected View
  Nux/Area.cpp
  Nux/Area.h
  Nux/Layout.cpp
  Nux/Layout.h
  Nux/View.cpp
  Nux/View.h

== Fixed ClientArea to work with RedirectedViews
  Nux/ClientArea.cpp
  Nux/ClientArea.h

== Concrete implementation of a view to replace InputArea in some locations
  Nux/BasicView.cpp
  Nux/BasicView.h

== Nux.h contains the Feature.h file of Nux
  Nux/Nux.h

== API change to frame buffer object architecture
  NuxGraphics/IOpenGLFrameBufferObject.cpp
  NuxGraphics/IOpenGLFrameBufferObject.h

== Added InitSlTexturePremultiplyShader shader
  NuxGraphics/RenderingPipeGLSL.cpp
  NuxGraphics/GraphicsEngine.cpp
  NuxGraphics/GraphicsEngine.h
  NuxGraphics/RenderingPipeAsm.cpp

== Fixed texture inversion
  NuxGraphics/RenderingPipe.cpp. Fixes: https://bugs.launchpad.net/bugs/1049593. Approved by Neil J. Patel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
  GraphicsEngine::GraphicsEngine(GraphicsDisplay& GlWindow, bool create_rendering_data)
154
154
  : _graphics_display(GlWindow)
155
155
  {
 
156
 
 
157
    IOpenGLShaderProgram::SetShaderTracking(true);
156
158
    _scissor.x = 0;
157
159
    _scissor.y = 0;
158
160
    _clip_offset_x = 0;
1037
1039
    _projection_matrix.Orthographic(0, viewport_width, viewport_height, 0, -1.0f, 1.0f);
1038
1040
  }
1039
1041
 
 
1042
  void GraphicsEngine::SetOrthographicProjectionMatrix(int left, int right, int bottom, int top)
 
1043
  {
 
1044
    _projection_matrix.Orthographic(left, right, bottom, top, -1.0f, 1.0f);
 
1045
  }
 
1046
 
1040
1047
  void GraphicsEngine::ResetProjectionMatrix()
1041
1048
  {
1042
1049
    _projection_matrix = Matrix4::IDENTITY();