Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: RenderTexture passes its texture ovenership to Texture  (Read 8931 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: RenderTexture passes its texture ovenership to Texture
« Reply #15 on: August 28, 2014, 03:18:43 pm »
To me, we don't need such a feature anyway and this discussion can thus be closed.
Laurent Gomila - SFML developer

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: RenderTexture passes its texture ovenership to Texture
« Reply #16 on: August 28, 2014, 03:41:32 pm »
Well, it depends really. If people, for whatever reason, want to use a single RenderTexture to draw to multiple texture destinations every frame because they only need a single "drawer" RenderTexture, then it makes sense to enable them to do so. Some time not so long ago, I even recommended reusing RenderTextures because it minimizes the number of contexts floating around, and in the end, it really doesn't make sense to store multiple of them if you can reuse the same one. OpenGL FBOs were designed to be easy to swap out attachments for for this purpose, so I don't see why we shouldn't pass that power on to SFML's users as well.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: RenderTexture passes its texture ovenership to Texture
« Reply #17 on: August 28, 2014, 03:46:41 pm »
Quote
If people, for whatever reason, want to use a single RenderTexture to draw to multiple texture destinations every frame because they only need a single "drawer" RenderTexture, [...]
Then let's find a relevant use case for this before deciding anything. You know the SFML philosophy, "don't do it if nobody needs it" ;)
Laurent Gomila - SFML developer

Hapax

  • Hero Member
  • *****
  • Posts: 3351
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: RenderTexture passes its texture ovenership to Texture
« Reply #18 on: August 28, 2014, 04:09:56 pm »
I thought the philosophy was "don't do it if only one person needs it".  :P

A possible scenario that someone may possibly want to do is a group of television screens  ;D

EDIT: If this rendertexture(texture) thing works, I guess that would do that.
« Last Edit: August 28, 2014, 04:12:07 pm by Hapax »
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: RenderTexture passes its texture ovenership to Texture
« Reply #19 on: August 28, 2014, 04:14:00 pm »
Quote
I thought the philosophy was "don't do it if only one person needs it".
It has slightly evolved since then :P

Quote
A possible scenario that someone may possibly want to do is a group of television screens
I'd like answers without the words "possible", "may", "possibly", etc. Real use cases please.

Quote
If this rendertexture(texture) thing works, I guess that would do that.
Such a thing doesn't exist, it was just an idea. And no, it wouldn't do that since the RenderTexture would be tied to a unique Texture instance.
Laurent Gomila - SFML developer

Hapax

  • Hero Member
  • *****
  • Posts: 3351
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: RenderTexture passes its texture ovenership to Texture
« Reply #20 on: August 28, 2014, 05:17:51 pm »
It has slightly evolved since then :P
Good to know  :)

I'd like answers without the words "possible", "may", "possibly", etc. Real use cases please.
This means that you are waiting for someone to require it for a project before considering implementing it. In which case, SFML will not be able to provide for the requirement of their project. The "possibly" stuff is a way of saying that these things could happen and is one example of something people may require. If someone said that they were going to do the thing that I just suggested as a possibility, does that make it a real use case?

the RenderTexture would be tied to a unique Texture instance.
Tied? Does this mean that the texture cannot be used as a texture for anything else?  :o
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: RenderTexture passes its texture ovenership to Texture
« Reply #21 on: August 28, 2014, 07:43:27 pm »
Quote
This means that you are waiting for someone to require it for a project before considering implementing it. In which case, SFML will not be able to provide for the requirement of their project. The "possibly" stuff is a way of saying that these things could happen and is one example of something people may require. If someone said that they were going to do the thing that I just suggested as a possibility, does that make it a real use case?
Since this feature would be an optimization only, it won't block anyone. So yes, I'd really like to know if someone really needs this before doing it. If nobody cares, there's probably no point making the code more complicated.

Quote
Tied? Does this mean that the texture cannot be used as a texture for anything else?
No. I just said that since you pass the texture to the constructor, you won't be able to change it afterwards. So you end up with 1 RenderTexture = 1 Texture, which is exactly what the current API does. No point.
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: RenderTexture passes its texture ovenership to Texture
« Reply #22 on: August 28, 2014, 09:43:08 pm »
Of course it shouldn't be fixed, that's why I wrote "like this". ;)

Hapax

  • Hero Member
  • *****
  • Posts: 3351
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: RenderTexture passes its texture ovenership to Texture
« Reply #23 on: August 29, 2014, 01:38:40 am »
If nobody cares, there's probably no point making the code more complicated.
I didn't realise that it would, I'm sorry.

I just said...
I wasn't trying to trick you or question whether you stated anything correctly or anything. I genuinely just wanted to know. Sorry if you understood it that way  :(
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything