*Image is just 32×32 size PNG black square
HERE ARE 5 TRIES IN (THE ONLY DIFFERENCE OF EACH CODE IS THE POSITION)!:#1Sprites:sf::RenderWindow::create(GetHandle());
m_texture.loadFromFile("Centre.png");
m_sprite.setTexture(m_texture);
m_sprite.setPosition
(0, 0);
Update:clear(sf::Color(255, 255, 255));
draw(m_sprite);
Result:(removed)
#2Sprites:sf::RenderWindow::create(GetHandle());
m_texture.loadFromFile("Centre.png");
m_sprite.setTexture(m_texture);
m_sprite.setPosition
(25, 25);
Update:clear(sf::Color(255, 255, 255));
draw(m_sprite);
Result:(removed)
#3Sprites:sf::RenderWindow::create(GetHandle());
m_texture.loadFromFile("Centre.png");
m_sprite.setTexture(m_texture);
m_sprite.setPosition
(-25, -25);
Update:clear(sf::Color(255, 255, 255));
draw(m_sprite);
Result:(removed)
#4position -50, -50
- result: same or similarily positioned square as #1 or #3
#5position -75, -75 and above
- result: not drawn (same as #2)
Full code:wxSFML.h =>
http://pastebin.com/uMnauuZ1wxSFML.cpp =>
http://pastebin.com/SKSw6gLkCreation code:cstScene = new wxSFMLCanvas(this,ID_CUSTOM1,wxPoint(332,332),wxDefaultSize);
(cstScene is docked as center in AUI (advanced UI) in wxWidgets.
THE PROBLEM (OBVIOUS):unable to draw sprite/texture on center on proper position