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

Author Topic: Image GL_REPEAT  (Read 29494 times)

0 Members and 1 Guest are viewing this topic.

tgm

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Image GL_REPEAT
« on: May 01, 2008, 01:01:08 pm »
I would like to see something like Image -> SetRepeat(true);
Or to be more precise control over the WRAP of a texture
Well , Iknow this was in v. 1.2
But somehow it isn't in the current release...
Could we get this back, or are there any internal problems with this one?
thx tgm

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Image GL_REPEAT
« Reply #1 on: May 01, 2008, 01:58:04 pm »
Yes, it was removed because of internal problems. The main one is that an image can be stored in a bigger texture padded with white pixels, in case you have a non-power-of-two texture and your system doesn't support it. In this case, GL_REPEAT can't be used.
Laurent Gomila - SFML developer

tgm

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Image GL_REPEAT
« Reply #2 on: May 01, 2008, 03:31:31 pm »
well, it can.. (though it might look.... strange^^) but aint it better to have a most of the time working solution than no solution at all?
anyway.. gonna copy the old routine and try to get it working on my own.. (at least my PC supports no ^2 text^^)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Image GL_REPEAT
« Reply #3 on: May 01, 2008, 04:00:40 pm »
Quote
well, it can.. (though it might look.... strange^^) but aint it better to have a most of the time working solution than no solution at all?

Absolutely not. If a feature can't work everywhere with everyone (except some special ones like shaders), I can't provide it. That's called consistency ;)
Laurent Gomila - SFML developer

tgm

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Image GL_REPEAT
« Reply #4 on: May 01, 2008, 04:04:46 pm »
uhm.. well, guess your right about this one.. but the feture would work.. it would simply look strange... I think other engines handel this problem by scaling up the image..  not filling the rest with white stuff... maybe thats an idea ?
anyway.. I just ripped the code from the old release ;) works fine..

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Image GL_REPEAT
« Reply #5 on: May 01, 2008, 04:34:08 pm »
Scaling up in 2D is not really an option, some people want to keep a pixel perfect rendering.
Laurent Gomila - SFML developer

tgm

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Image GL_REPEAT
« Reply #6 on: May 02, 2008, 11:21:47 am »
dammit.. your right there ;)

Redien

  • Newbie
  • *
  • Posts: 30
    • View Profile
Image GL_REPEAT
« Reply #7 on: May 02, 2008, 01:06:49 pm »
An option could be to add support for these kinds of features as extentions to SFML. That way the library would be consistent "out of the box" and for those who need this extra functionality, they can just get the extention. If a wiki is set up, the extentions could be listed from there.

Just a thought. :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Image GL_REPEAT
« Reply #8 on: May 02, 2008, 01:35:06 pm »
Well, to extend SFML there's a simpler way : just put direct OpenGL calls where SFML doesn't do what you want. In most cases it will be enough.
Laurent Gomila - SFML developer

Redien

  • Newbie
  • *
  • Posts: 30
    • View Profile
Image GL_REPEAT
« Reply #9 on: May 03, 2008, 12:27:42 am »
But these little improvements still take time to implement, even if it is not much time at all. (I have to admit, this specific topic wasn't the best example, but if a number of people requested some advanced functionality to sf::View for example which would break the current one.)

I just think it would be nice to have such features already written, that are easy to get a hold of and integrate well with the library.

It would also stop people from requesting them as a part of the library. ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Image GL_REPEAT
« Reply #10 on: May 03, 2008, 03:43:18 am »
I know, and althought I won't implement this one, I'm still opened to every suggestion :)
Laurent Gomila - SFML developer