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

Author Topic: Texturing sf::Shape  (Read 1876 times)

0 Members and 1 Guest are viewing this topic.

Kordman916

  • Newbie
  • *
  • Posts: 9
    • View Profile
Texturing sf::Shape
« on: December 09, 2010, 02:37:06 am »
Hey everyone,

I was working on a quick demo to help me learn SFML and C++ and I realized...

I have no idea on how to texture shapes.

All I want to do is apply a box texture to a box/rectangular shape.

Can anyone tell me how or direct me to a place that can instruct me?

Thanks in advance,
Kordman916

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Texturing sf::Shape
« Reply #1 on: December 09, 2010, 08:07:58 am »
You can't texture shapes, but for a rectangular one you can use a sprite.
Laurent Gomila - SFML developer

Kordman916

  • Newbie
  • *
  • Posts: 9
    • View Profile
Texturing sf::Shape
« Reply #2 on: December 09, 2010, 07:29:12 pm »
How would I go about doing that?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Texturing sf::Shape
« Reply #3 on: December 09, 2010, 07:36:31 pm »
Take a look at the official tutorials, they explain how to work with sf::Sprite.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: