mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-24 01:14:15 +02:00
fixed gamma on rift, removed extraneous code from quest, clarified variable names
This commit is contained in:
parent
301791c07e
commit
a1a3eccad9
7 changed files with 11 additions and 9 deletions
|
@ -111,7 +111,7 @@ bool Basic2DWindowOpenGLDisplayPlugin::internalActivate() {
|
||||||
|
|
||||||
gpu::PipelinePointer Basic2DWindowOpenGLDisplayPlugin::getCompositeScenePipeline() {
|
gpu::PipelinePointer Basic2DWindowOpenGLDisplayPlugin::getCompositeScenePipeline() {
|
||||||
#if defined(Q_OS_ANDROID)
|
#if defined(Q_OS_ANDROID)
|
||||||
return _compositePipeline;
|
return _linearToSRGBPipeline;
|
||||||
#endif
|
#endif
|
||||||
//return _drawTexturePipeline;
|
//return _drawTexturePipeline;
|
||||||
return _SRGBToLinearPipeline;
|
return _SRGBToLinearPipeline;
|
||||||
|
|
|
@ -398,7 +398,7 @@ void OpenGLDisplayPlugin::customizeContext() {
|
||||||
_drawTexturePipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTexture), scissorState);
|
_drawTexturePipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTexture), scissorState);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
_compositePipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureGammaLinearToSRGB), scissorState);
|
_linearToSRGBPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureGammaLinearToSRGB), scissorState);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
_SRGBToLinearPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureGammaSRGBToLinear), scissorState);
|
_SRGBToLinearPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureGammaSRGBToLinear), scissorState);
|
||||||
|
@ -917,6 +917,8 @@ void OpenGLDisplayPlugin::render(std::function<void(gpu::Batch& batch)> f) {
|
||||||
OpenGLDisplayPlugin::~OpenGLDisplayPlugin() {
|
OpenGLDisplayPlugin::~OpenGLDisplayPlugin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: added this to allow desktop composite framebuffer to be RGBA while mobile is SRGBA.
|
||||||
|
// This is a workaround
|
||||||
gpu::Element OpenGLDisplayPlugin::getCompositeFBColorSpace() {
|
gpu::Element OpenGLDisplayPlugin::getCompositeFBColorSpace() {
|
||||||
return gpu::Element::COLOR_RGBA_32;
|
return gpu::Element::COLOR_RGBA_32;
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@ protected:
|
||||||
gpu::PipelinePointer _mirrorHUDPipeline;
|
gpu::PipelinePointer _mirrorHUDPipeline;
|
||||||
gpu::ShaderPointer _mirrorHUDPS;
|
gpu::ShaderPointer _mirrorHUDPS;
|
||||||
gpu::PipelinePointer _drawTexturePipeline;
|
gpu::PipelinePointer _drawTexturePipeline;
|
||||||
gpu::PipelinePointer _compositePipeline;
|
gpu::PipelinePointer _linearToSRGBPipeline;
|
||||||
gpu::PipelinePointer _SRGBToLinearPipeline;
|
gpu::PipelinePointer _SRGBToLinearPipeline;
|
||||||
gpu::PipelinePointer _cursorPipeline;
|
gpu::PipelinePointer _cursorPipeline;
|
||||||
|
|
||||||
|
|
|
@ -102,10 +102,6 @@ void OculusMobileDisplayPlugin::uncustomizeContext() {
|
||||||
Parent::uncustomizeContext();
|
Parent::uncustomizeContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
gpu::Element OculusMobileDisplayPlugin::getCompositeFBColorSpace() {
|
|
||||||
return gpu::Element::COLOR_SRGBA_32;
|
|
||||||
}
|
|
||||||
|
|
||||||
QRectF OculusMobileDisplayPlugin::getPlayAreaRect() {
|
QRectF OculusMobileDisplayPlugin::getPlayAreaRect() {
|
||||||
QRectF result;
|
QRectF result;
|
||||||
VrHandler::withOvrMobile([&](ovrMobile* session){
|
VrHandler::withOvrMobile([&](ovrMobile* session){
|
||||||
|
|
|
@ -44,8 +44,6 @@ public:
|
||||||
void init() override;
|
void init() override;
|
||||||
void deinit() override;
|
void deinit() override;
|
||||||
|
|
||||||
virtual gpu::Element getCompositeFBColorSpace() override;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const QString getName() const override { return NAME; }
|
const QString getName() const override { return NAME; }
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,10 @@ void OculusDisplayPlugin::uncustomizeContext() {
|
||||||
Parent::uncustomizeContext();
|
Parent::uncustomizeContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gpu::PipelinePointer OculusDisplayPlugin::getCompositeScenePipeline() {
|
||||||
|
return _SRGBToLinearPipeline;
|
||||||
|
}
|
||||||
|
|
||||||
static const uint64_t FRAME_BUDGET = (11 * USECS_PER_MSEC);
|
static const uint64_t FRAME_BUDGET = (11 * USECS_PER_MSEC);
|
||||||
static const uint64_t FRAME_OVER_BUDGET = (15 * USECS_PER_MSEC);
|
static const uint64_t FRAME_OVER_BUDGET = (15 * USECS_PER_MSEC);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,8 @@ protected:
|
||||||
void uncustomizeContext() override;
|
void uncustomizeContext() override;
|
||||||
void cycleDebugOutput() override;
|
void cycleDebugOutput() override;
|
||||||
|
|
||||||
|
virtual gpu::PipelinePointer getCompositeScenePipeline() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const char* NAME;
|
static const char* NAME;
|
||||||
ovrTextureSwapChain _textureSwapChain;
|
ovrTextureSwapChain _textureSwapChain;
|
||||||
|
|
Loading…
Reference in a new issue