mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:17:02 +02:00
Disable debug HMD plugin, ensure we release resources each frame
This commit is contained in:
parent
c66ed3e009
commit
884ee1a68b
3 changed files with 8 additions and 3 deletions
|
@ -170,6 +170,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute the frame and present it to the display device.
|
// Execute the frame and present it to the display device.
|
||||||
|
_context->makeCurrent();
|
||||||
{
|
{
|
||||||
PROFILE_RANGE("PluginPresent")
|
PROFILE_RANGE("PluginPresent")
|
||||||
currentPlugin->present();
|
currentPlugin->present();
|
||||||
|
@ -580,6 +581,7 @@ void OpenGLDisplayPlugin::present() {
|
||||||
|
|
||||||
incrementPresentCount();
|
incrementPresentCount();
|
||||||
if (_currentFrame) {
|
if (_currentFrame) {
|
||||||
|
_backend->cleanupTrash();
|
||||||
_backend->setStereoState(_currentFrame->stereoState);
|
_backend->setStereoState(_currentFrame->stereoState);
|
||||||
{
|
{
|
||||||
PROFILE_RANGE_EX("execute", 0xff00ff00, (uint64_t)presentCount())
|
PROFILE_RANGE_EX("execute", 0xff00ff00, (uint64_t)presentCount())
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
//
|
//
|
||||||
#include "DebugHmdDisplayPlugin.h"
|
#include "DebugHmdDisplayPlugin.h"
|
||||||
|
|
||||||
|
#include <QtCore/QProcessEnvironment>
|
||||||
|
|
||||||
#include <ViewFrustum.h>
|
#include <ViewFrustum.h>
|
||||||
#include <controllers/Pose.h>
|
#include <controllers/Pose.h>
|
||||||
#include <gpu/Frame.h>
|
#include <gpu/Frame.h>
|
||||||
|
@ -14,10 +16,11 @@
|
||||||
const QString DebugHmdDisplayPlugin::NAME("HMD Simulator");
|
const QString DebugHmdDisplayPlugin::NAME("HMD Simulator");
|
||||||
|
|
||||||
static const QString DEBUG_FLAG("HIFI_DEBUG_HMD");
|
static const QString DEBUG_FLAG("HIFI_DEBUG_HMD");
|
||||||
|
static bool enableDebugHmd = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG);
|
||||||
|
|
||||||
|
|
||||||
bool DebugHmdDisplayPlugin::isSupported() const {
|
bool DebugHmdDisplayPlugin::isSupported() const {
|
||||||
// FIXME use the env variable
|
return enableDebugHmd;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugHmdDisplayPlugin::resetSensors() {
|
void DebugHmdDisplayPlugin::resetSensors() {
|
||||||
|
|
|
@ -12,6 +12,6 @@ const QString SideBySideStereoDisplayPlugin::NAME("3D TV - Side by Side Stereo")
|
||||||
|
|
||||||
glm::uvec2 SideBySideStereoDisplayPlugin::getRecommendedRenderSize() const {
|
glm::uvec2 SideBySideStereoDisplayPlugin::getRecommendedRenderSize() const {
|
||||||
uvec2 result = Parent::getRecommendedRenderSize();
|
uvec2 result = Parent::getRecommendedRenderSize();
|
||||||
//result.x *= 2;
|
result.x *= 2;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue