RenderTexture support?

  • 25 Replies
  • 7476 Views
Re: RenderTexture support?
« Reply #15 on: 16 August 2013, 22:28:56 »
My friend just tested it on Windows 8. Same result as me.


*

texus

  • *****
  • 1590
    • View Profile
    • Texus's Blog
Re: RenderTexture support?
« Reply #16 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.

Re: RenderTexture support?
« Reply #17 on: 16 August 2013, 23:40:40 »
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

  • *****
  • 1590
    • View Profile
    • Texus's Blog
Re: RenderTexture support?
« Reply #18 on: 16 August 2013, 23:48:48 »
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.
« Last Edit: 16 August 2013, 23:52:02 by texus »

*

texus

  • *****
  • 1590
    • View Profile
    • Texus's Blog
Re: RenderTexture support?
« Reply #19 on: 17 August 2013, 00:02:14 »
Now we are getting somewhere.
The executable produces the same result as you had.

Re: RenderTexture support?
« Reply #20 on: 17 August 2013, 00:08:42 »
Awesome. Sounds like progress :)

*

texus

  • *****
  • 1590
    • View Profile
    • Texus's Blog
Re: RenderTexture support?
« Reply #21 on: 17 August 2013, 00:14:22 »
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.
« Last Edit: 17 August 2013, 00:30:03 by texus »

Re: RenderTexture support?
« Reply #22 on: 17 August 2013, 00:33:23 »
Ok awesome.

Re: RenderTexture support?
« Reply #23 on: 17 August 2013, 00:45:49 »
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

  • *****
  • 1590
    • View Profile
    • Texus's Blog
Re: RenderTexture support?
« Reply #24 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.

Re: RenderTexture support?
« Reply #25 on: 17 August 2013, 20:13:15 »
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 :)