<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 10, 2015 at 12:51 PM, Bill Spitzak <span dir="ltr"><<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This all looks really good to me.<br>
<br>
It is possible to avoid "GL coordinates" even in GL. Set the projection matrix to an ortho matrix:<br>
<br>
glMatrixMode(GL_PROJECTION);<br>
glLoadIdentity()<br>
glOrtho(0, width, height, 0, -1, 1);<br>
glTranslate(-width/2, -height/2, 0);<br>
glMatrixMode(GL_MODELVIEW);<br>
<br>
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.<br>
<br>
This would reduce the number of coordinate spaces you need to think about.<br></blockquote><div><br></div><div>Except weston's GL render is GLES2 which doesn't have a matrix stack... <br></div></div><br></div></div>