mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:57:58 +02:00
Dont render red border for mouse magnifier
This commit is contained in:
parent
2eda35ff1d
commit
bee84a064c
2 changed files with 18 additions and 16 deletions
|
@ -261,7 +261,8 @@ void ApplicationOverlay::displayOverlayTextureOculus(Camera& whichCamera) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_magSizeMult[i] > 0.0f) {
|
if (_magSizeMult[i] > 0.0f) {
|
||||||
renderMagnifier(_magX[i], _magY[i], _magSizeMult[i]);
|
//Render magnifier, but dont show border for mouse magnifier
|
||||||
|
renderMagnifier(_magX[i], _magY[i], _magSizeMult[i], i != MOUSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -518,7 +519,7 @@ void ApplicationOverlay::renderControllerPointersOculus() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Renders a small magnification of the currently bound texture at the coordinates
|
//Renders a small magnification of the currently bound texture at the coordinates
|
||||||
void ApplicationOverlay::renderMagnifier(int mouseX, int mouseY, float sizeMult) const
|
void ApplicationOverlay::renderMagnifier(int mouseX, int mouseY, float sizeMult, bool showBorder) const
|
||||||
{
|
{
|
||||||
Application* application = Application::getInstance();
|
Application* application = Application::getInstance();
|
||||||
QGLWidget* glWidget = application->getGLWidget();
|
QGLWidget* glWidget = application->getGLWidget();
|
||||||
|
@ -596,6 +597,7 @@ void ApplicationOverlay::renderMagnifier(int mouseX, int mouseY, float sizeMult)
|
||||||
trZ = 0;
|
trZ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (showBorder) {
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
glLineWidth(1.0f);
|
glLineWidth(1.0f);
|
||||||
//Outer Line
|
//Outer Line
|
||||||
|
@ -608,10 +610,10 @@ void ApplicationOverlay::renderMagnifier(int mouseX, int mouseY, float sizeMult)
|
||||||
glVertex3f(lX, bY, -blZ);
|
glVertex3f(lX, bY, -blZ);
|
||||||
glVertex3f(lX, tY, -tlZ);
|
glVertex3f(lX, tY, -tlZ);
|
||||||
|
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, _alpha);
|
|
||||||
|
|
||||||
glEnd();
|
glEnd();
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
}
|
||||||
|
glColor4f(1.0f, 1.0f, 1.0f, _alpha);
|
||||||
|
|
||||||
glBegin(GL_QUADS);
|
glBegin(GL_QUADS);
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ private:
|
||||||
void renderPointers();
|
void renderPointers();
|
||||||
void renderControllerPointers();
|
void renderControllerPointers();
|
||||||
void renderControllerPointersOculus();
|
void renderControllerPointersOculus();
|
||||||
void renderMagnifier(int mouseX, int mouseY, float sizeMult) const;
|
void renderMagnifier(int mouseX, int mouseY, float sizeMult, bool showBorder) const;
|
||||||
void renderAudioMeter();
|
void renderAudioMeter();
|
||||||
void renderStatsAndLogs();
|
void renderStatsAndLogs();
|
||||||
void renderTexturedHemisphere();
|
void renderTexturedHemisphere();
|
||||||
|
|
Loading…
Reference in a new issue