Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Window
»
[Solved] Drawing outside of the window
Print
Pages: [
1
]
Author
Topic: [Solved] Drawing outside of the window (Read 4783 times)
0 Members and 1 Guest are viewing this topic.
Kernelpanic
Jr. Member
Posts: 50
[Solved] Drawing outside of the window
«
on:
May 30, 2008, 02:47:52 pm »
When I call RenderWindow::Draw, would it be usefull to check, if the coordinates are outside of the window or is there any automatically checking?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
[Solved] Drawing outside of the window
«
Reply #1 on:
May 30, 2008, 03:12:23 pm »
SFML does no automatic culling, so it might be worth doing it if your application is not CPU bound.
Logged
Laurent Gomila - SFML developer
Kernelpanic
Jr. Member
Posts: 50
[Solved] Drawing outside of the window
«
Reply #2 on:
May 30, 2008, 03:21:37 pm »
Okay, so RenderWindow::Draw takes graficpower, althoug the coordinates are out of the window, am I right?
I will insert some ifs. (I want to make some gui-classes)
Logged
Laurent
Administrator
Hero Member
Posts: 32498
[Solved] Drawing outside of the window
«
Reply #3 on:
May 30, 2008, 03:32:21 pm »
First make sure you really need it, sometimes it will be faster to directly send a few invisible sprites rather than using some CPU power to discard them. Especially if your GPU spends most of its time doing nothing (which is usually the case), you can feed it with useless stuff
If it's just for a GUI, I don't think you need this kind of optimization.
Logged
Laurent Gomila - SFML developer
Kernelpanic
Jr. Member
Posts: 50
[Solved] Drawing outside of the window
«
Reply #4 on:
May 30, 2008, 03:40:47 pm »
Okay, I will see.
I think I will make a function like OptimizeForSlowGPU(bool) setting a pointer to the function with the if.
Thank you, Laurent!
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Window
»
[Solved] Drawing outside of the window