1771
Graphics / Re: Sprite and Texture errors
« on: September 04, 2012, 07:53:44 pm »Quote
OpenGL somehow releases the textureDon't be cussin like that around me.
void Sprite::draw(RenderTarget& target, RenderStates states) const
{
if (m_texture)
{
states.transform *= getTransform();
states.texture = m_texture;
target.draw(m_vertices, 4, Quads, states);
}
}
But sprite holds pointer to sf texture not anything opengl and draws like that so there is garbage in the space where old texture pointer points to(maybe)?
{
if (m_texture)
{
states.transform *= getTransform();
states.texture = m_texture;
target.draw(m_vertices, 4, Quads, states);
}
}