1. 16 Jun, 2011 1 commit
    • Robert Bragg's avatar
      paint-volumes: remove alignment constraint for completion · a9789616
      Robert Bragg authored
      This removes the constraint that a paint-volume must be axis aligned
      before _clutter_paint_volume_complete can be called. NB: A paint volume
      is represented by one origin vertex and then three axis vertices to
      define the width, height and depth of the volume. It's straightforward
      to use the vectors from the origin to the axis vertices to deduce the
      other 4 vertices so we can remove the is_axis_aligned assertion.
      a9789616
  2. 02 Jun, 2011 1 commit
    • Robert Bragg's avatar
      culling: Use vertex_count not '4' to determine partial culls · 588d97c2
      Robert Bragg authored
      We were mistakenly using the constant 4 to determine the number of
      vertices that need to be culled for a paint-volume to be considered
      fully culled too. This is only ok for 2d volumes and was resulting in
      some 3d volumes being considered culled whenever 4 out of 8 vertices
      were culled. This fix is simply to reference the vertex_count variable
      instead of assuming 4.
      588d97c2
  3. 11 Apr, 2011 1 commit
    • Robert Bragg's avatar
      paint-volume: Fix culling bug to handle partial culls · 114133c9
      Robert Bragg authored
      This updates the inner loops of the cull function so now the vertices of
      the polygon being culled are iterated in the inner loop instead of the
      clip planes and we count how many vertices are outside the current
      plane so we can bail out immediately if all the vertices are outside of
      any plane and so we can correctly track partial intersections with the
      clip region.
      
      The previous approach could catch some partial intersections but for
      example a rectangle that was larger than the clip region centred over
      the clip region with all corners outside would be reported as outside,
      not as a partial intersection.
      114133c9
  4. 01 Apr, 2011 1 commit
  5. 10 Mar, 2011 1 commit
    • Robert Bragg's avatar
      culling: check volume->is_empty before ->is_complete · 3303b081
      Robert Bragg authored
      As documented in cogl-pipeline-private.h, there is a precedence to the
      ClutterPaintVolume bitfields that should be considered whenever we
      implement code that manipulates PaintVolumes...
      
      Firstly if ->is_empty == TRUE then the values for ->is_complete and
      ->is_2d are undefined, so we should typically check ->is_empty as the
      first priority.
      
      This fixes a bug in _clutter_paint_volume_cull() whereby we were
      checking pv->is_complete before checking pv->is_empty which was
      resulting in assertions for actors with no size.
      3303b081
  6. 07 Mar, 2011 2 commits
    • Robert Bragg's avatar
      Optimize culling by doing culling in eye-coordinates · 19b86229
      Robert Bragg authored
      This implements a variation of frustum culling whereby we convert screen
      space clip rectangles into eye space mini-frustums so that we don't have
      to repeatedly transform actor paint-volumes all the way into screen
      coordinates to perform culling, we just have to apply the modelview
      transform and then determine each points distance from the planes that
      make up the clip frustum.
      
      By avoiding the projective transform, perspective divide and viewport
      scale for each point culled this makes culling much cheaper.
      19b86229
    • Robert Bragg's avatar
      viewport: consistently use floats for viewports · 013b2433
      Robert Bragg authored
      OpenGL < 4.0 only supports integer based viewports and internally we
      have a mixture of code using floats and integers for viewports. This
      patch switches all viewports throughout clutter and cogl to be
      represented using floats considering that in the future we may want to
      take advantage of floating point viewports with modern hardware/drivers.
      013b2433
  7. 23 Nov, 2010 1 commit
    • Robert Bragg's avatar
      use cogl_matrix_transform_points in clutter · 305bb124
      Robert Bragg authored
      When transforming a paint-volume or transforming allocation vertices we
      are transforming more than one point at a time so we can batch those
      together with cogl_matrix_transform_points instead of
      cogl_matrix_transform_point. Also in both of these cases we don't need
      to do a projective transform so using cogl_matrix_transform_points also
      lets us reduce the per-vertex computation.
      305bb124
  8. 18 Nov, 2010 1 commit
    • Emmanuele Bassi's avatar
      paint-volume: Do not take a reference on the actor · a94ea93b
      Emmanuele Bassi authored
      The paint volume structure is cached in the Actor it references, and
      this causes a reference cycle.
      
      The paint volume is going to be used when painting, so the actor must
      still be valid - otherwise Clutter will bail out far before than
      accessing the actor pointer in ClutterPaintVolume.
      
      Otherwise, we could have used dispose() to check for a valid actor and
      remove a reference if the actor field is !NULL; it feels less clean,
      though, since we're effectively managing an extra reference on
      ourselves.
      
      http://bugzilla.clutter-project.org/show_bug.cgi?id=2431
      a94ea93b
  9. 15 Nov, 2010 1 commit
  10. 21 Oct, 2010 2 commits
  11. 18 Oct, 2010 1 commit
  12. 11 Oct, 2010 2 commits
  13. 29 Sep, 2010 6 commits