Fix MSAA Canvas readback;

This commit is contained in:
bjorn 2020-05-26 09:53:26 -06:00
parent 6d2fdac89f
commit 90e985c45b
1 changed files with 4 additions and 0 deletions

View File

@ -2035,6 +2035,10 @@ TextureData* lovrCanvasNewTextureData(Canvas* canvas, uint32_t index) {
lovrGraphicsFlushCanvas(canvas);
lovrGpuBindCanvas(canvas, false);
if (canvas->flags.msaa) {
glBindFramebuffer(GL_READ_FRAMEBUFFER, canvas->resolveBuffer);
}
#ifndef LOVR_WEBGL
Texture* texture = canvas->attachments[index].texture;
if ((texture->incoherent >> BARRIER_TEXTURE) & 1) {