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

Author Topic: Draw Depth  (Read 3833 times)

0 Members and 1 Guest are viewing this topic.

asphyxiac

  • Newbie
  • *
  • Posts: 5
    • View Profile
Draw Depth
« on: November 11, 2009, 02:37:10 am »
Hi, how do I set the draw depth?

Do I have to glEnable the depth buffer and manually change the matrix?

RixCoder

  • Newbie
  • *
  • Posts: 40
    • View Profile
Draw Depth
« Reply #1 on: November 11, 2009, 05:35:45 am »
i wrote a simple render system that i sent objects to with a z value that it would sort before rendering.

SFML as far as i know has no built in method of doing it in the window draw function.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Draw Depth
« Reply #2 on: November 11, 2009, 08:32:53 am »
That's true, there's no depth in SFML. The depth is simply given by the drawing order.
Laurent Gomila - SFML developer

Uncle_Mike

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Draw Depth
« Reply #3 on: November 21, 2012, 08:09:15 pm »
Sorry, in SFML 2.0 no depth too?  It is a big shortcoming.  Very often I can not observe sequence of sprite output to screen according to z-position...

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Draw Depth
« Reply #4 on: November 21, 2012, 08:22:53 pm »
Quote
in SFML 2.0 no depth too?
No depth in SFML 2.0, sorry.
Laurent Gomila - SFML developer

didii

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Draw Depth
« Reply #5 on: November 21, 2012, 08:58:53 pm »
Sorry, in SFML 2.0 no depth too?  It is a big shortcoming.  Very often I can not observe sequence of sprite output to screen according to z-position...
Let me remind you that SFML is a "low level" language and not anywhere near an engine :)
As RixCoder says: you should be able to implement it yourself. It is just a matter of which is drawn last on screen.

masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: Draw Depth
« Reply #6 on: November 21, 2012, 10:01:50 pm »
Raw OpenGL or a proper 3D rendering library/engine that is compatible with SFML can do the job, so there's really no need for it to be implemented in SFML (it was not meant for it anyway).
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!