Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Depth information
Print
Pages: [
1
]
Author
Topic: Depth information (Read 4752 times)
0 Members and 1 Guest are viewing this topic.
BlueMagic
Newbie
Posts: 49
Depth information
«
on:
January 20, 2012, 05:37:22 am »
Is there any reason for SFML not to include support for depth buffering? (ie does it alter performance?). Or is it simply based on another way of rendering or something like that.
Logged
Breakman79
Jr. Member
Posts: 58
Depth information
«
Reply #1 on:
January 20, 2012, 06:13:46 am »
No, it doesn't have a depth buffer; however, you can control depth by the order in which you draw items. If you need an object to appear under another object simply make sure you draw it first.
Logged
BlueMagic
Newbie
Posts: 49
Depth information
«
Reply #2 on:
January 20, 2012, 06:36:14 am »
I fully understand that (even tough it's kind of difficult to sort out in a top down game where the depth depends directly on the position of the entities).
I just want to know the reason, if there's one.
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Depth information
«
Reply #3 on:
January 20, 2012, 07:58:58 am »
There are three reasons (from most important to least):
- it doesn't work with semi-transparent entities
- it makes the API slightly more complex for little gain
- user can break SFML by disabling depth buffer
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Depth information