Cleanup snowballs2

--HG--
branch : multipass-stereo
This commit is contained in:
kaetemi 2014-08-04 05:24:40 +02:00
parent ec4762f669
commit fb525e3911
2 changed files with 2 additions and 21 deletions

View file

@ -402,17 +402,6 @@ void updateCommands()
float CommandsBoxHeight = ((float)(sint32)((CommandsNbLines + 1) * CommandsLineHeight * width)) / width;
float CommandsBoxBorderX = ((float)(sint32)(SBCLIENT::CommandsBoxBorder * width)) / width;
float CommandsBoxBorderY = ((float)(sint32)(SBCLIENT::CommandsBoxBorder * height)) / height;
if (StereoHMD)
{
float xshift, yshift;
StereoHMD->getInterface2DShift(0, xshift, yshift, 4.f);
// snap to pixels
xshift = ((float)(sint32)(xshift * width)) / width;
yshift = ((float)(sint32)(yshift * height)) / height;
// adjust
CommandsBoxX += xshift;
CommandsBoxY += yshift;
}
// Display the background
Driver->setMatrixMode2D11 ();

View file

@ -95,13 +95,6 @@ void updateCompass ()
{
float x = CompassPosX;
float y = CompassPosY;
if (StereoHMD)
{
float xshift, yshift;
StereoHMD->getInterface2DShift(0, xshift, yshift, 4.f);
x += xshift;
y += yshift;
}
float radius = CompassRadius;
// tri
@ -117,8 +110,7 @@ void updateCompass ()
quad.V2.set ( radius, radius, 0);
quad.V3.set (-radius, radius, 0);
if (StereoHMD) Driver->setMatrixMode2D11();
else Driver->setMatrixMode2D43();
Driver->setMatrixMode2D43();
CMatrix mtx;
@ -161,7 +153,7 @@ void updateCompass ()
Driver->setModelMatrix (mtx);
Driver->drawQuad (quad, CompassMaterial);
if (!StereoHMD) x *= 3.0/4.0f;
x *= 3.0/4.0f;
// Print position
TextContext->setHotSpot(UTextContext::MiddleTop);