SFML community forums

Help => Graphics => Topic started by: HardCoded on November 10, 2011, 05:33:49 am

Title: sf::Texture.. "colliding" with sf::Text ?
Post by: HardCoded on November 10, 2011, 05:33:49 am
I wouldn't really know how to post the code because there's just so much =/
But, somehow, when I display sf::Text on the RenderWindow, I have a texture applied to the texts (all of them) when I never did anything like that.
(I didn't even know you could apply textures to texts)

I've been trying to find the simplest way to replicate the issue but I can't =/
I do know that I use the following:
sf::Font
sf::Sprit
sf::Texture
sf::Text

Texture and Sprite are for the 'units' in my game while Font and Text are for little menus.

I don't see any direct interaction between the classes that would make it bug but it's happening to me.
Replicable in my project but not from scratch.

I'm using SFML2.0
I would upload the entire project but it's 70MB =/

(http://i147.photobucket.com/albums/r291/luciusxx/bug.png)

[EDIT]
I moved the source files to a new project and zipped it up: http://a2step.com/ErrorProj.rar

It won't compile straight away as it needs the libs, dlls and header files for SFML2.0 to be configured for it.
Anyways, if you run it, go to NewGame->Easy, you will see the text bug with a texture applied on it =/

I wish I could replicate it in an easy way but I can't =/
Title: sf::Texture.. "colliding" with sf::Text ?
Post by: Laurent on November 10, 2011, 07:37:09 am
Comment line 236 in Renderer.cpp.
Title: sf::Texture.. "colliding" with sf::Text ?
Post by: HardCoded on November 10, 2011, 11:54:23 am
*Mind blown*
Oh, wow.
Thanks, Laurent!