SFML community forums
Help => Graphics => Topic started by: Robbis_1 on August 27, 2011, 01:03:31 pm
-
Hey, I'm currently using SFML 2.0 and I'm drawing a circle using sf::Shape and the AddPoint function. This is all working good, but I'd like to apply a texture to the circle.
I just want to apply it in a simple way, so it would look like you took a quad, rendered it with a texture and then put a circle in the middle of it and sampled only those parts inside the circle. In other words, I'd like to apply an UV map to my circle somehow.
Is there any way of doing this in SFML? Or would I have to do it with OpenGL? If it's the latter, then I could use some help with it. :wink:
-
Texturing shapes is not yet possible in SFML, but it will be with the new rendering system that Laurent is currently implementing. The final release of SFML 2.0 should offer this functionality.
By the way, do you need more flexibility that you add points manually using AddPoint() instead of calling sf::Shape::Circle()?
-
Ah, thanks. I guess I'll have to wait then.
Yes, I'm creating really big spheres, so I'm only creating the part of the sphere that's inside the screen. This allows me to make it in a higher resolution and only draw the points that's inside the screen.