Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Object containers
Print
Pages: [
1
]
Author
Topic: Object containers (Read 1140 times)
0 Members and 1 Guest are viewing this topic.
glad
Newbie
Posts: 1
Object containers
«
on:
May 16, 2022, 04:44:43 pm »
I'm looking for a container for sprites which could be placed inside a window and has it's own local coordinate system, and if sprites inside the container are not in it's bounds they won't be rendered.
Is there a way to achive this?
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11034
Re: Object containers
«
Reply #1 on:
May 17, 2022, 09:03:00 am »
You can use a view and limit it to a certain area (see the
view tutorial
).
Or you could use a RenderTexture that matches the area's size and render into it. If it doesn't fall onto the render texture itself, it wouldn't be shown.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Object containers
anything