1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00

Fix MSAA Canvas readback;

This commit is contained in:
bjorn 2020-05-26 09:53:26 -06:00
parent 6d2fdac89f
commit 90e985c45b

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) {