Prevent crash when AFT draws an AFT
by remember the previous render target.
This commit is contained in:
@@ -47,6 +47,7 @@ void RageTextureRenderTarget::Destroy()
|
||||
|
||||
void RageTextureRenderTarget::BeginRenderingTo( bool bPreserveTexture )
|
||||
{
|
||||
m_iPreviousRenderTarget = DISPLAY->GetRenderTarget( );
|
||||
DISPLAY->SetRenderTarget( m_iTexHandle, bPreserveTexture );
|
||||
|
||||
/* We're rendering to a texture, not the framebuffer.
|
||||
@@ -69,7 +70,7 @@ void RageTextureRenderTarget::FinishRenderingTo()
|
||||
DISPLAY->CameraPopMatrix();
|
||||
DISPLAY->PopMatrix();
|
||||
|
||||
DISPLAY->SetRenderTarget( 0 );
|
||||
DISPLAY->SetRenderTarget( m_iPreviousRenderTarget );
|
||||
}
|
||||
|
||||
// lua start
|
||||
|
||||
Reference in New Issue
Block a user