Merge lp:~linaro-graphics-wg/glmark2/desktop-shadow into lp:glmark2/2011.11
Proposed by
Alexandros Frantzis
Status: | Merged |
---|---|
Approved by: | Jesse Barker |
Approved revision: | 153 |
Merged at revision: | 155 |
Proposed branch: | lp:~linaro-graphics-wg/glmark2/desktop-shadow |
Merge into: | lp:glmark2/2011.11 |
Diff against target: |
276 lines (+178/-11) 1 file modified
src/scene-desktop.cpp (+178/-11) |
To merge this branch: | bzr merge lp:~linaro-graphics-wg/glmark2/desktop-shadow |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jesse Barker | Approve | ||
Review via email: mp+79268@code.launchpad.net |
To post a comment you must log in.
On Thu, Oct 13, 2011 at 5:33 AM, Alexandros Frantzis <email address hidden> wrote: /code.launchpad .net/~linaro- graphics- wg/glmark2/ desktop- shadow/ +merge/ 79268 /code.launchpad .net/~linaro- graphics- wg/glmark2/ desktop- shadow/ +merge/ 79268 desktop- shadow- corner. png' desktop- shadow- corner. png 1970-01-01 00:00:00 +0000 and data/textures/ desktop- shadow- corner. png 2011-10-13 12:32:25 +0000 differ desktop- shadow. png' desktop- shadow. png 1970-01-01 00:00:00 +0000 and data/textures/ desktop- shadow. png 2011-10-13 12:32:25 +0000 differ desktop. cpp' desktop. cpp 2011-09-21 15:00:40 +0000 desktop. cpp 2011-10-13 12:32:25 +0000 to(RenderObject & target, Program& program = main_program) normalize_ position( pos_)); normalize_ position( final_pos) ); normalize_ position( :vec2(position[ 2 * i], position[2 * i + 1]) position( LibMatrix: :vec2& pos) position( const LibMatrix::vec2& pos)
> Alexandros Frantzis has proposed merging lp:~linaro-graphics-wg/glmark2/desktop-shadow into lp:glmark2.
>
> Requested reviews:
> Jesse Barker (jesse-barker)
>
> For more details, see:
> https:/
> --
> https:/
> You are requested to review the proposed merge of lp:~linaro-graphics-wg/glmark2/desktop-shadow into lp:glmark2.
>
> === added file 'data/textures/
> Binary files data/textures/
> === added file 'data/textures/
> Binary files data/textures/
> === modified file 'src/scene-
> --- src/scene-
> +++ src/scene-
> @@ -104,7 +104,7 @@
> class RenderObject
> {
> public:
> - RenderObject() : texture_(0), fbo_(0) { }
> + RenderObject() : texture_(0), fbo_(0), rotation_rad_(0) { }
>
> virtual ~RenderObject() { release(); }
>
> @@ -199,17 +199,29 @@
>
> virtual void render_
> {
> - LibMatrix::vec2 final_pos(pos_ + size_);
> - LibMatrix::vec2 ll(target.
> - LibMatrix::vec2 ur(target.
> + LibMatrix::vec2 anchor(pos_);
> + LibMatrix::vec2 ll(pos_ - anchor);
> + LibMatrix::vec2 ur(pos_ + size_ - anchor);
>
> + /* Calculate new position according to rotation value */
> GLfloat position[2 * 4] = {
> - ll.x(), ll.y(),
> - ur.x(), ll.y(),
> - ll.x(), ur.y(),
> - ur.x(), ur.y(),
> + rotate_x(ll.x(), ll.y()) + anchor.x(), rotate_y(ll.x(), ll.y()) + anchor.y(),
> + rotate_x(ur.x(), ll.y()) + anchor.x(), rotate_y(ur.x(), ll.y()) + anchor.y(),
> + rotate_x(ll.x(), ur.y()) + anchor.x(), rotate_y(ll.x(), ur.y()) + anchor.y(),
> + rotate_x(ur.x(), ur.y()) + anchor.x(), rotate_y(ur.x(), ur.y()) + anchor.y(),
> };
>
> + /* Normalize position and write back to array */
> + for (int i = 0; i < 4; i++) {
> + const LibMatrix::vec2& v2(
> + target.
> + LibMatrix:
> + )
> + );
> + position[2 * i] = v2.x();
> + position[2 * i + 1] = v2.y();
> + }
> +
> static const GLfloat texcoord[2 * 4] = {
> 0.0, 0.0,
> 1.0, 0.0,
> @@ -251,7 +263,7 @@
> /**
> * Normalizes a position from [0, size] to [-1.0, 1.0]
> */
> - LibMatrix::vec2 normalize_
> + LibMatrix::vec2 normalize_
...