Jump to content

WidgetSprite.setWrapRepeat


photo

Recommended Posts

Posted

I'm trying to use setWrapRepeat on a sprite to tile the texture but it doesn't seem to have any effect, no matter what value I pass in as a parameter. The docs say it requires a positive number to enabled tiling, so I call it with 1, and then use setWidth/setHeight to resize the sprite. The texture just stretches instead of tiling. Is there some other way I should specify the size to get tiling to work or is this function broken?

Posted

You should modify sprite texture coordinates to see the effect.

Try WidgetSprite::setTexCoord(vec4(0.0f,0.0f,4.0f,4.0f)) function;

×
×
  • Create New...