mirror of
https://github.com/SFML/SFML.git
synced 2025-02-19 06:39:59 +08:00
Postpone generation of the RenderTarget ID to RenderTarget::initialize() so that a new ID is generated whenever the RenderTarget is re-create()ed.
This commit is contained in:
parent
bd7f30d0ba
commit
8fea4fbfb4
@ -129,7 +129,7 @@ RenderTarget::RenderTarget() :
|
|||||||
m_defaultView(),
|
m_defaultView(),
|
||||||
m_view (),
|
m_view (),
|
||||||
m_cache (),
|
m_cache (),
|
||||||
m_id (getUniqueId())
|
m_id (0)
|
||||||
{
|
{
|
||||||
m_cache.glStatesSet = false;
|
m_cache.glStatesSet = false;
|
||||||
}
|
}
|
||||||
@ -547,6 +547,10 @@ void RenderTarget::initialize()
|
|||||||
|
|
||||||
// Set GL states only on first draw, so that we don't pollute user's states
|
// Set GL states only on first draw, so that we don't pollute user's states
|
||||||
m_cache.glStatesSet = false;
|
m_cache.glStatesSet = false;
|
||||||
|
|
||||||
|
// Generate a unique ID for this RenderTarget to track
|
||||||
|
// whether it is active within a specific context
|
||||||
|
m_id = getUniqueId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user