mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 20:26:24 +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_MAX_LEVEL, numMips-1);
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
|
||||
resetOutputStage();
|
||||
// Restore viewport
|
||||
ivec4& vp = _transform._viewport;
|
||||
glViewport(vp.x, vp.y, vp.z, vp.w);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue