RenderTexture support?

Started by jungletoe, 15 August 2013, 23:03:24

jungletoe

My friend just tested it on Windows 8. Same result as me.


texus

Ok, could you send me everything needed to reproduce this?
The source code, executable, images u use, even the compiled sfml and tgui libraries.

I want to test this with the exact same resources.

jungletoe

Quote from: texus on 16 August 2013, 22:59:28
Ok, could you send me everything needed to reproduce this?
The source code, executable, images u use, even the compiled sfml and tgui libraries.

I want to test this with the exact same resources.

Sure.
https://fbe.am/mJZ

Just place the SFML and TGUI folders in C:\ and you'll be set. That ZIP contains everything.



texus

#18
Great, but how the heck do I download it?
I'd say by logging in, but it won't register me.

Could you perhaps put it on something like dropbox?

EDIT: Nermind, I found it. Half of the page wasn't displayed because of AddBlock Plus.

texus

Now we are getting somewhere.
The executable produces the same result as you had.

jungletoe

Awesome. Sounds like progress :)

texus

#21
We have been looking at the wrong place.

Creating the Form and even calling the draw function causes no problem.

It is the button that is causing the problems. The image is drawn when the button is drawn (when the form is drawn). This is why you only saw something when form.draw was uncommented. If you remove the button->setPosition(...) call you will also notice that the small image isn't drawn on the same spot anymore.

So basically your texture is used as image for the button. The question that remains is why.

Edit:
I"ll continue running tests tomorrow. I'll check if it does the same on an ati card, if there is a difference when I rebuild the libraries (dynamic vs static), if it is solved with the different design in v0.6, ...
So hopefully I will be able to find, and if possible fix, this issue tomorrow.

jungletoe


jungletoe

By the way, I should mention that in my client I ran for my game, it didn't just draw the whole RenderTexture for all of the buttons/elements (tgui::Picture doesnt work as well), it drew the sources. So if I spliced up a frame within a PNG image, the whole PNG would show, not just the parts I selected. You can see this happen in the first picture I posted with tileset.png

texus

I found the issue.

You were linking to the static sfml libraries, but to the dynamic tgui libraries. This isn't possible (because tgui uses the SFML_STATIC as well). I am very surprised that this is even possible, I would have expected tons of errors or warnings in this situation.

So if you link to tgui-s.lib instead of tgui.lib then the problem should go away.

jungletoe

Quote from: texus on 17 August 2013, 11:57:55
I found the issue.

You were linking to the static sfml libraries, but to the dynamic tgui libraries. This isn't possible (because tgui uses the SFML_STATIC as well). I am very surprised that this is even possible, I would have expected tons of errors or warnings in this situation.

So if you link to tgui-s.lib instead of tgui.lib then the problem should go away.

Haha ok, that's really weird. Thanks for your time :)