mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 21:29:33 +02:00
Fixed corrupted glViewport after call to generateMipWithPipeline
This commit is contained in:
parent
0316df4fae
commit
5dcb7f622a
1 changed files with 5 additions and 0 deletions
|
@ -118,6 +118,11 @@ void GLBackend::do_generateTextureMipsWithPipeline(const Batch& batch, size_t pa
|
||||||
}
|
}
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, numMips-1);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, numMips-1);
|
||||||
|
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
|
||||||
|
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||||
|
|
||||||
resetOutputStage();
|
resetOutputStage();
|
||||||
|
// Restore viewport
|
||||||
|
ivec4& vp = _transform._viewport;
|
||||||
|
glViewport(vp.x, vp.y, vp.z, vp.w);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue