mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 12:12:39 +02:00
added comments and cleaned up
This commit is contained in:
parent
250d18d7df
commit
3d36c5714f
2 changed files with 6 additions and 3 deletions
|
@ -574,9 +574,10 @@ std::function<void(gpu::Batch&, const gpu::TexturePointer&, bool mirror)> OpenGL
|
|||
std::array<glm::ivec4, 2> hudEyeViewports;
|
||||
for_each_eye([&](Eye eye) { hudEyeViewports[eye] = eyeViewport(eye); });
|
||||
return [=](gpu::Batch& batch, const gpu::TexturePointer& hudTexture, bool mirror) {
|
||||
if (hudPipeline && hudTexture) {
|
||||
auto pipeline = mirror ? hudMirrorPipeline : hudPipeline;
|
||||
if (pipeline && hudTexture) {
|
||||
batch.enableStereo(false);
|
||||
batch.setPipeline(mirror ? hudMirrorPipeline : hudPipeline);
|
||||
batch.setPipeline(pipeline);
|
||||
batch.setResourceTexture(0, hudTexture);
|
||||
if (hudStereo) {
|
||||
for_each_eye([&](Eye eye) {
|
||||
|
@ -954,6 +955,9 @@ gpu::PipelinePointer OpenGLDisplayPlugin::getCompositeScenePipeline() {
|
|||
return _drawTexturePipeline;
|
||||
}
|
||||
|
||||
// Added this to allow desktop composite framebuffer to be RGBA while mobile is SRGBA, so that tone mapping looks right on both platforms
|
||||
// Overridden by Basic2DWindowDisplayPlugin to achieve this
|
||||
// FIXME: Eventually it would be ideal to have both framebuffers be of the same type
|
||||
gpu::Element OpenGLDisplayPlugin::getCompositeFBColorSpace() {
|
||||
return gpu::Element::COLOR_RGBA_32;
|
||||
}
|
||||
|
|
|
@ -167,7 +167,6 @@ void OculusDisplayPlugin::hmdPresent() {
|
|||
batch.setStateScissorRect(ivec4(uvec2(), _outputFramebuffer->getSize()));
|
||||
batch.resetViewTransform();
|
||||
batch.setProjectionTransform(mat4());
|
||||
//batch.setPipeline(_drawTexturePipeline);
|
||||
batch.setPipeline(_drawTexturePipeline);
|
||||
batch.setResourceTexture(0, _compositeFramebuffer->getRenderBuffer(0));
|
||||
batch.draw(gpu::TRIANGLE_STRIP, 4);
|
||||
|
|
Loading…
Reference in a new issue