mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 20:17:01 +02:00
Renamed OverlayRenderer to ApplicationOverlay and moved it up a directory
This commit is contained in:
parent
21fb18a92e
commit
ebfb11c1ce
5 changed files with 37 additions and 37 deletions
|
@ -165,7 +165,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
_runningScriptsWidget(new RunningScriptsWidget(_window)),
|
_runningScriptsWidget(new RunningScriptsWidget(_window)),
|
||||||
_runningScriptsWidgetWasVisible(false),
|
_runningScriptsWidgetWasVisible(false),
|
||||||
_trayIcon(new QSystemTrayIcon(_window)),
|
_trayIcon(new QSystemTrayIcon(_window)),
|
||||||
_overlayRenderer()
|
_applicationOverlay()
|
||||||
{
|
{
|
||||||
// read the ApplicationInfo.ini file for Name/Version/Domain information
|
// read the ApplicationInfo.ini file for Name/Version/Domain information
|
||||||
QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
|
QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
|
||||||
|
@ -646,7 +646,7 @@ void Application::paintGL() {
|
||||||
_rearMirrorTools->render(true);
|
_rearMirrorTools->render(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
_overlayRenderer.renderOverlay();
|
_applicationOverlay.renderOverlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
_frameCount++;
|
_frameCount++;
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
#include "ui/LogDialog.h"
|
#include "ui/LogDialog.h"
|
||||||
#include "ui/UpdateDialog.h"
|
#include "ui/UpdateDialog.h"
|
||||||
#include "ui/overlays/Overlays.h"
|
#include "ui/overlays/Overlays.h"
|
||||||
#include "ui/overlays/OverlayRenderer.h"
|
#include "ui/ApplicationOverlay.h"
|
||||||
#include "ui/RunningScriptsWidget.h"
|
#include "ui/RunningScriptsWidget.h"
|
||||||
#include "voxels/VoxelFade.h"
|
#include "voxels/VoxelFade.h"
|
||||||
#include "voxels/VoxelHideShowThread.h"
|
#include "voxels/VoxelHideShowThread.h"
|
||||||
|
@ -216,7 +216,7 @@ public:
|
||||||
BandwidthMeter* getBandwidthMeter() { return &_bandwidthMeter; }
|
BandwidthMeter* getBandwidthMeter() { return &_bandwidthMeter; }
|
||||||
QUndoStack* getUndoStack() { return &_undoStack; }
|
QUndoStack* getUndoStack() { return &_undoStack; }
|
||||||
QSystemTrayIcon* getTrayIcon() { return _trayIcon; }
|
QSystemTrayIcon* getTrayIcon() { return _trayIcon; }
|
||||||
OverlayRenderer& getOverlayRenderer() { return _overlayRenderer; }
|
ApplicationOverlay& getApplicationOverlay() { return _applicationOverlay; }
|
||||||
Overlays& getOverlays() { return _overlays; }
|
Overlays& getOverlays() { return _overlays; }
|
||||||
|
|
||||||
float getFps() const { return _fps; }
|
float getFps() const { return _fps; }
|
||||||
|
@ -569,7 +569,7 @@ private:
|
||||||
TouchEvent _lastTouchEvent;
|
TouchEvent _lastTouchEvent;
|
||||||
|
|
||||||
Overlays _overlays;
|
Overlays _overlays;
|
||||||
OverlayRenderer _overlayRenderer;
|
ApplicationOverlay _applicationOverlay;
|
||||||
|
|
||||||
AudioReflector _audioReflector;
|
AudioReflector _audioReflector;
|
||||||
RunningScriptsWidget* _runningScriptsWidget;
|
RunningScriptsWidget* _runningScriptsWidget;
|
||||||
|
|
|
@ -81,9 +81,9 @@ void OculusManager::configureCamera(Camera& camera, int screenWidth, int screenH
|
||||||
|
|
||||||
void OculusManager::display(Camera& whichCamera) {
|
void OculusManager::display(Camera& whichCamera) {
|
||||||
#ifdef HAVE_LIBOVR
|
#ifdef HAVE_LIBOVR
|
||||||
OverlayRenderer& overlayRenderer = Application::getInstance()->getOverlayRenderer();
|
ApplicationOverlay& applicationOverlay = Application::getInstance()->getApplicationOverlay();
|
||||||
// We only need to render the overlays to a texture once, then we just render the texture as a quad
|
// We only need to render the overlays to a texture once, then we just render the texture as a quad
|
||||||
overlayRenderer.renderOverlay(true);
|
applicationOverlay.renderOverlay(true);
|
||||||
|
|
||||||
Application::getInstance()->getGlowEffect()->prepare();
|
Application::getInstance()->getGlowEffect()->prepare();
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ void OculusManager::display(Camera& whichCamera) {
|
||||||
|
|
||||||
Application::getInstance()->displaySide(whichCamera);
|
Application::getInstance()->displaySide(whichCamera);
|
||||||
|
|
||||||
overlayRenderer.displayOverlayTextureOculus(whichCamera);
|
applicationOverlay.displayOverlayTextureOculus(whichCamera);
|
||||||
|
|
||||||
// and the right eye to the right side
|
// and the right eye to the right side
|
||||||
const StereoEyeParams& rightEyeParams = _stereoConfig.GetEyeRenderParams(StereoEye_Right);
|
const StereoEyeParams& rightEyeParams = _stereoConfig.GetEyeRenderParams(StereoEye_Right);
|
||||||
|
@ -121,7 +121,7 @@ void OculusManager::display(Camera& whichCamera) {
|
||||||
|
|
||||||
Application::getInstance()->displaySide(whichCamera);
|
Application::getInstance()->displaySide(whichCamera);
|
||||||
|
|
||||||
overlayRenderer.displayOverlayTextureOculus(whichCamera);
|
applicationOverlay.displayOverlayTextureOculus(whichCamera);
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// OverlayRenderer.cpp
|
// ApplicationOverlay.cpp
|
||||||
// interface/src/ui/overlays
|
// interface/src/ui/overlays
|
||||||
//
|
//
|
||||||
// Created by Benjamin Arnold on 5/27/14.
|
// Created by Benjamin Arnold on 5/27/14.
|
||||||
|
@ -15,15 +15,15 @@
|
||||||
#include <PerfStat.h>
|
#include <PerfStat.h>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "OverlayRenderer.h"
|
#include "ApplicationOverlay.h"
|
||||||
|
|
||||||
#include "ui/Stats.h"
|
#include "ui/Stats.h"
|
||||||
|
|
||||||
OverlayRenderer::OverlayRenderer() : _framebufferObject(NULL) {
|
ApplicationOverlay::ApplicationOverlay() : _framebufferObject(NULL) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OverlayRenderer::~OverlayRenderer() {
|
ApplicationOverlay::~ApplicationOverlay() {
|
||||||
if (_framebufferObject != NULL) {
|
if (_framebufferObject != NULL) {
|
||||||
delete _framebufferObject;
|
delete _framebufferObject;
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,8 @@ OverlayRenderer::~OverlayRenderer() {
|
||||||
const float WHITE_TEXT[] = { 0.93f, 0.93f, 0.93f };
|
const float WHITE_TEXT[] = { 0.93f, 0.93f, 0.93f };
|
||||||
|
|
||||||
// Renders the overlays either to a texture or to the screen
|
// Renders the overlays either to a texture or to the screen
|
||||||
void OverlayRenderer::renderOverlay(bool renderToTexture) {
|
void ApplicationOverlay::renderOverlay(bool renderToTexture) {
|
||||||
PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "OverlayRenderer::displayOverlay()");
|
PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "ApplicationOverlay::displayOverlay()");
|
||||||
|
|
||||||
Application* application = Application::getInstance();
|
Application* application = Application::getInstance();
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ void OverlayRenderer::renderOverlay(bool renderToTexture) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draws the FBO texture for the screen
|
// Draws the FBO texture for the screen
|
||||||
void OverlayRenderer::displayOverlayTexture(Camera& whichCamera) {
|
void ApplicationOverlay::displayOverlayTexture(Camera& whichCamera) {
|
||||||
|
|
||||||
Application* application = Application::getInstance();
|
Application* application = Application::getInstance();
|
||||||
QGLWidget* glWidget = application->getGLWidget();
|
QGLWidget* glWidget = application->getGLWidget();
|
||||||
|
@ -263,7 +263,7 @@ void OverlayRenderer::displayOverlayTexture(Camera& whichCamera) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draws the FBO texture for Oculus rift. TODO: Draw a curved texture instead of plane.
|
// Draws the FBO texture for Oculus rift. TODO: Draw a curved texture instead of plane.
|
||||||
void OverlayRenderer::displayOverlayTextureOculus(Camera& whichCamera) {
|
void ApplicationOverlay::displayOverlayTextureOculus(Camera& whichCamera) {
|
||||||
|
|
||||||
Application* application = Application::getInstance();
|
Application* application = Application::getInstance();
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ void OverlayRenderer::displayOverlayTextureOculus(Camera& whichCamera) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QOpenGLFramebufferObject* OverlayRenderer::getFramebufferObject() {
|
QOpenGLFramebufferObject* ApplicationOverlay::getFramebufferObject() {
|
||||||
if (!_framebufferObject) {
|
if (!_framebufferObject) {
|
||||||
_framebufferObject = new QOpenGLFramebufferObject(Application::getInstance()->getGLWidget()->size());
|
_framebufferObject = new QOpenGLFramebufferObject(Application::getInstance()->getGLWidget()->size());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// OverlayRenderer.h
|
// ApplicationOverlay.h
|
||||||
// interface/src/ui/overlays
|
// interface/src/ui/overlays
|
||||||
//
|
//
|
||||||
// Created by Benjamin Arnold on 5/27/14.
|
// Created by Benjamin Arnold on 5/27/14.
|
||||||
|
@ -9,18 +9,18 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef hifi_OverlayRenderer_h
|
#ifndef hifi_ApplicationOverlay_h
|
||||||
#define hifi_OverlayRenderer_h
|
#define hifi_ApplicationOverlay_h
|
||||||
|
|
||||||
class Overlays;
|
class Overlays;
|
||||||
class QOpenGLFramebufferObject;
|
class QOpenGLFramebufferObject;
|
||||||
|
|
||||||
// Handles the drawing of the overlays to the scree
|
// Handles the drawing of the overlays to the scree
|
||||||
class OverlayRenderer {
|
class ApplicationOverlay {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
OverlayRenderer();
|
ApplicationOverlay();
|
||||||
~OverlayRenderer();
|
~ApplicationOverlay();
|
||||||
|
|
||||||
void renderOverlay(bool renderToTexture = false);
|
void renderOverlay(bool renderToTexture = false);
|
||||||
void displayOverlayTexture(Camera& whichCamera);
|
void displayOverlayTexture(Camera& whichCamera);
|
||||||
|
@ -35,4 +35,4 @@ private:
|
||||||
float _trailingAudioLoudness;
|
float _trailingAudioLoudness;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_OverlayRenderer_h
|
#endif // hifi_ApplicationOverlay_h
|
Loading…
Reference in a new issue