diff options
author | marha <marha@users.sourceforge.net> | 2014-10-25 19:53:22 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-10-25 19:53:22 +0200 |
commit | d6d5581d5fba846c8476ad4d593da662306765d7 (patch) | |
tree | 7a864e15d2c5007b7c3298487a59f11f15c55c75 /mesalib/src/mesa/state_tracker/st_atom_viewport.c | |
parent | a14858a22f164b5accc4bd192a5d3de21d88e3d1 (diff) | |
download | vcxsrv-d6d5581d5fba846c8476ad4d593da662306765d7.tar.gz vcxsrv-d6d5581d5fba846c8476ad4d593da662306765d7.tar.bz2 vcxsrv-d6d5581d5fba846c8476ad4d593da662306765d7.zip |
libXft mesa xserver pixman xkeyboard-config git update 25 Oct 2014
xserver commit 16a32c53f6e9ad1f3284d4596edfa33e9efb740e
xkeyboard-config commit 0d4c3d9d891536aa1ec4f1fff5e3df51cfd2718d
pixman commit 594e6a6c93e92fcfb495e987aec5617f6c37f467
libXft commit e8a83226bc10afb587f6f34daac44d2ef809c85e
mesa commit 13862812dc910a4ef57cb72cb9fe777ce3c14515
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_viewport.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_viewport.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_viewport.c b/mesalib/src/mesa/state_tracker/st_atom_viewport.c index 7584f9b3d..5b992084b 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_viewport.c +++ b/mesalib/src/mesa/state_tracker/st_atom_viewport.c @@ -27,6 +27,7 @@ #include "main/context.h" +#include "main/viewport.h" #include "st_context.h" #include "st_atom.h" #include "pipe/p_context.h" @@ -63,21 +64,17 @@ update_viewport( struct st_context *st ) */ for (i = 0; i < ctx->Const.MaxViewports; i++) { - GLfloat x = ctx->ViewportArray[i].X; - GLfloat y = ctx->ViewportArray[i].Y; - GLfloat z = ctx->ViewportArray[i].Near; - GLfloat half_width = ctx->ViewportArray[i].Width * 0.5f; - GLfloat half_height = ctx->ViewportArray[i].Height * 0.5f; - GLfloat half_depth = (GLfloat)(ctx->ViewportArray[i].Far - ctx->ViewportArray[i].Near) * 0.5f; - - st->state.viewport[i].scale[0] = half_width; - st->state.viewport[i].scale[1] = half_height * yScale; - st->state.viewport[i].scale[2] = half_depth; + double scale[3], translate[3]; + _mesa_get_viewport_xform(ctx, i, scale, translate); + + st->state.viewport[i].scale[0] = scale[0]; + st->state.viewport[i].scale[1] = scale[1] * yScale; + st->state.viewport[i].scale[2] = scale[2]; st->state.viewport[i].scale[3] = 1.0; - st->state.viewport[i].translate[0] = half_width + x; - st->state.viewport[i].translate[1] = (half_height + y) * yScale + yBias; - st->state.viewport[i].translate[2] = half_depth + z; + st->state.viewport[i].translate[0] = translate[0]; + st->state.viewport[i].translate[1] = translate[1] * yScale + yBias; + st->state.viewport[i].translate[2] = translate[2]; st->state.viewport[i].translate[3] = 0.0; } |