[PATCH weston v2 00/16] Fix pixman-renderer cropping
Jason Ekstrand
jason at jlekstrand.net
Tue Mar 10 13:45:13 PDT 2015
On Tue, Mar 10, 2015 at 12:51 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> This all looks really good to me.
>
> It is possible to avoid "GL coordinates" even in GL. Set the projection
> matrix to an ortho matrix:
>
> glMatrixMode(GL_PROJECTION);
> glLoadIdentity()
> glOrtho(0, width, height, 0, -1, 1);
> glTranslate(-width/2, -height/2, 0);
> glMatrixMode(GL_MODELVIEW);
>
> I remember in our code we did this by directly with glLoadMatrix. This
> avoided any error with how the center was calculated, and made the Z output
> to be zero. However I am unsure if that is portable to all devices.
>
> This would reduce the number of coordinate spaces you need to think about.
>
Except weston's GL render is GLES2 which doesn't have a matrix stack...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150310/7f356605/attachment.html>
More information about the wayland-devel
mailing list