mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
Cleanup snowballs2
--HG-- branch : multipass-stereo
This commit is contained in:
parent
ec4762f669
commit
fb525e3911
2 changed files with 2 additions and 21 deletions
|
@ -402,17 +402,6 @@ void updateCommands()
|
||||||
float CommandsBoxHeight = ((float)(sint32)((CommandsNbLines + 1) * CommandsLineHeight * width)) / width;
|
float CommandsBoxHeight = ((float)(sint32)((CommandsNbLines + 1) * CommandsLineHeight * width)) / width;
|
||||||
float CommandsBoxBorderX = ((float)(sint32)(SBCLIENT::CommandsBoxBorder * width)) / width;
|
float CommandsBoxBorderX = ((float)(sint32)(SBCLIENT::CommandsBoxBorder * width)) / width;
|
||||||
float CommandsBoxBorderY = ((float)(sint32)(SBCLIENT::CommandsBoxBorder * height)) / height;
|
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
|
// Display the background
|
||||||
Driver->setMatrixMode2D11 ();
|
Driver->setMatrixMode2D11 ();
|
||||||
|
|
|
@ -95,13 +95,6 @@ void updateCompass ()
|
||||||
{
|
{
|
||||||
float x = CompassPosX;
|
float x = CompassPosX;
|
||||||
float y = CompassPosY;
|
float y = CompassPosY;
|
||||||
if (StereoHMD)
|
|
||||||
{
|
|
||||||
float xshift, yshift;
|
|
||||||
StereoHMD->getInterface2DShift(0, xshift, yshift, 4.f);
|
|
||||||
x += xshift;
|
|
||||||
y += yshift;
|
|
||||||
}
|
|
||||||
float radius = CompassRadius;
|
float radius = CompassRadius;
|
||||||
|
|
||||||
// tri
|
// tri
|
||||||
|
@ -117,8 +110,7 @@ void updateCompass ()
|
||||||
quad.V2.set ( radius, radius, 0);
|
quad.V2.set ( radius, radius, 0);
|
||||||
quad.V3.set (-radius, radius, 0);
|
quad.V3.set (-radius, radius, 0);
|
||||||
|
|
||||||
if (StereoHMD) Driver->setMatrixMode2D11();
|
Driver->setMatrixMode2D43();
|
||||||
else Driver->setMatrixMode2D43();
|
|
||||||
|
|
||||||
CMatrix mtx;
|
CMatrix mtx;
|
||||||
|
|
||||||
|
@ -161,7 +153,7 @@ void updateCompass ()
|
||||||
Driver->setModelMatrix (mtx);
|
Driver->setModelMatrix (mtx);
|
||||||
Driver->drawQuad (quad, CompassMaterial);
|
Driver->drawQuad (quad, CompassMaterial);
|
||||||
|
|
||||||
if (!StereoHMD) x *= 3.0/4.0f;
|
x *= 3.0/4.0f;
|
||||||
|
|
||||||
// Print position
|
// Print position
|
||||||
TextContext->setHotSpot(UTextContext::MiddleTop);
|
TextContext->setHotSpot(UTextContext::MiddleTop);
|
||||||
|
|
Loading…
Reference in a new issue