mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
fix z_camera calcualtion in gles/cogl
This commit is contained in:
parent
d704e2e331
commit
5b845d3940
@ -1,3 +1,9 @@
|
|||||||
|
2007-05-29 Tomas Frydrych <tf@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/cogl/gles/cogl.c:
|
||||||
|
(cogl_setup_viewport):
|
||||||
|
Fixed z_camera calculation.
|
||||||
|
|
||||||
2007-05-28 Matthew Allum <mallum@openedhand.com>
|
2007-05-28 Matthew Allum <mallum@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-texture.c: (clutter_texture_unrealize):
|
* clutter/clutter-texture.c: (clutter_texture_unrealize):
|
||||||
|
@ -530,16 +530,9 @@ cogl_setup_viewport (guint w,
|
|||||||
|
|
||||||
/* camera distance from screen, 0.5 * tan (FOV) */
|
/* camera distance from screen, 0.5 * tan (FOV) */
|
||||||
#define DEFAULT_Z_CAMERA 0.866025404f
|
#define DEFAULT_Z_CAMERA 0.866025404f
|
||||||
z_camera = clutter_tani (fovy) << 1;
|
z_camera = clutter_tani (fovy) >> 1;
|
||||||
|
|
||||||
/*
|
GE( glTranslatex (-1 << 15, -1 << 15, -z_camera));
|
||||||
printf("%i vs %i\n",
|
|
||||||
CLUTTER_FLOAT_TO_FIXED(DEFAULT_Z_CAMERA),
|
|
||||||
clutter_tani (fovy) << 1);
|
|
||||||
*/
|
|
||||||
|
|
||||||
GE( glTranslatex (-1 << 15, -1 << 15, /*-z_camera*/
|
|
||||||
-CLUTTER_FLOAT_TO_FIXED(DEFAULT_Z_CAMERA)));
|
|
||||||
|
|
||||||
GE( glScalex ( CFX_ONE / width,
|
GE( glScalex ( CFX_ONE / width,
|
||||||
-CFX_ONE / height,
|
-CFX_ONE / height,
|
||||||
|
Loading…
Reference in New Issue
Block a user