mirror of
https://github.com/SFML/SFML.git
synced 2025-03-14 01:40:05 +08:00
Fixed RenderTarget tracking not being notified to update its active target when an FBO RenderTexture is display()ed.
This commit is contained in:
parent
659044dfb7
commit
0093224c8c
@ -163,9 +163,22 @@ bool RenderTexture::setActive(bool active)
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void RenderTexture::display()
|
void RenderTexture::display()
|
||||||
{
|
{
|
||||||
// Update the target texture
|
if (m_impl)
|
||||||
if (m_impl && (priv::RenderTextureImplFBO::isAvailable() || setActive(true)))
|
|
||||||
{
|
{
|
||||||
|
if (priv::RenderTextureImplFBO::isAvailable())
|
||||||
|
{
|
||||||
|
// Perform a RenderTarget-only activation if we are using FBOs
|
||||||
|
if (!RenderTarget::setActive())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Perform a full activation if we are not using FBOs
|
||||||
|
if (!setActive())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the target texture
|
||||||
m_impl->updateTexture(m_texture.m_texture);
|
m_impl->updateTexture(m_texture.m_texture);
|
||||||
m_texture.m_pixelsFlipped = true;
|
m_texture.m_pixelsFlipped = true;
|
||||||
m_texture.invalidateMipmap();
|
m_texture.invalidateMipmap();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user