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

Author Topic: Wrap mode on sprites  (Read 4339 times)

0 Members and 1 Guest are viewing this topic.

simmerd

  • Newbie
  • *
  • Posts: 2
    • View Profile
Wrap mode on sprites
« on: September 20, 2009, 07:04:05 pm »
Sprites are a great feature, but I want to use them for quick gui backgrounds, but I can't b/c the sprite texturing mode is set to clamp - which totally makes sense for a normal sprite.

But, it would be cool if there were a setting on the sprite to set the clamp mode to wrap/repeat.

Yes, I know I could use OpenGL... ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Wrap mode on sprites
« Reply #1 on: September 21, 2009, 08:48:13 am »
It's impossible because textures can be padded with white pixels (for GPUs not supporting NPOT dimensions).

Quote
Yes, I know I could use OpenGL...

You can also clone/repeat your sprite ;)
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Wrap mode on sprites
« Reply #2 on: September 21, 2009, 11:41:24 am »
Quote
You can also clone/repeat your sprite ;)

Which will be a bit hakish because we don't have clipping, yet. *shove* ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Wrap mode on sprites
« Reply #3 on: September 21, 2009, 02:47:24 pm »
But you have SetSubRect :)
Laurent Gomila - SFML developer

simmerd

  • Newbie
  • *
  • Posts: 2
    • View Profile
ok, request rescinded
« Reply #4 on: September 21, 2009, 04:01:33 pm »
Good point, I will repeat the sprite instead.. thanks...