Avoiding to rely on the display plugin resource in the getHUDOperator to avoid a case of unallocated resource

This commit is contained in:
Sam Gateau 2019-09-09 11:33:05 -07:00
parent 9c14838443
commit 3509a797a1

View file

@ -586,7 +586,7 @@ void OpenGLDisplayPlugin::updateFrameData() {
std::function<void(gpu::Batch&, const gpu::TexturePointer&)> OpenGLDisplayPlugin::getHUDOperator() {
auto hudPipeline = _hudPipeline;
auto hudStereo = isStereo();
auto hudCompositeFramebufferSize = _compositeFramebuffer->getSize();
auto hudCompositeFramebufferSize = getRecommendedRenderSize();
std::array<glm::ivec4, 2> hudEyeViewports;
for_each_eye([&](Eye eye) {
hudEyeViewports[eye] = eyeViewport(eye);