SFML community forums

General => Feature requests => Topic started by: tgm on May 01, 2008, 01:01:08 pm

Title: Image GL_REPEAT
Post by: tgm 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
Title: Image GL_REPEAT
Post by: Laurent 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.
Title: Image GL_REPEAT
Post by: tgm 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^^)
Title: Image GL_REPEAT
Post by: Laurent 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 ;)
Title: Image GL_REPEAT
Post by: tgm 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..
Title: Image GL_REPEAT
Post by: Laurent 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.
Title: Image GL_REPEAT
Post by: tgm on May 02, 2008, 11:21:47 am
dammit.. your right there ;)
Title: Image GL_REPEAT
Post by: Redien 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. :)
Title: Image GL_REPEAT
Post by: Laurent 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.
Title: Image GL_REPEAT
Post by: Redien 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. ;)
Title: Image GL_REPEAT
Post by: Laurent 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 :)