diff --git a/ChangeLog b/ChangeLog index f710df584..e5143b2b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-06-28 Matthew Allum + + * clutter/cogl/gl/cogl.c: (cogl_setup_viewport): + Improve fixed z_camera value for defualt perspective. + Appears pixel perfect on ATI and Intel at least + 2007-06-28 Tomas Frydrych * tests/test-perspective.c: diff --git a/clutter/cogl/gl/cogl.c b/clutter/cogl/gl/cogl.c index c8a3cda29..df3acb4a1 100644 --- a/clutter/cogl/gl/cogl.c +++ b/clutter/cogl/gl/cogl.c @@ -515,12 +515,14 @@ cogl_setup_viewport (guint width, * actor being offscreen. Perhaps more significantly, it also causes * hinting artifacts when rendering text. * - * So for the default 60 deg angle we worked out that the value of 0.8699 - * is giving correct stretch and no noticeable artifacts on text. + * So for the default 60 deg angle we worked out that the value of 0.869 + * is giving correct stretch and no noticeable artifacts on text. Seems + * good on all drivers too. */ -#define DEFAULT_Z_CAMERA 0.8699f +#define DEFAULT_Z_CAMERA 0.869f z_camera = DEFAULT_Z_CAMERA; + if (fovy != CFX_60) { ClutterFixed fovy_rad = CFX_MUL (fovy, CFX_PI) / 180; @@ -529,7 +531,7 @@ cogl_setup_viewport (guint width, CLUTTER_FIXED_TO_FLOAT (CFX_DIV (clutter_sinx (fovy_rad), clutter_cosx (fovy_rad)) >> 1); } - + GE( glTranslatef (-0.5f, -0.5f, -z_camera) ); GE( glScalef ( 1.0f / width, -1.0f / height,