Results 1 to 10 of 10

Thread: [OpenGL 2.0] Depth buffer problems

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    A sprite is a sprite, there is no depth, so I don't follow what you are thinking of. If it were 3D then it might make some sense, but as you are working with flat 2D sprites all you can really do is 2D tricks such as blending, ADD, OR, XOR and so on.

    If you want specific sprites to overlap over another then it's simply a matter of drawing order and you have to adjust that so that it is drawn last somehow. The use of a depth buffer seems like a waste of resources to do such things though.

    ...also, is this an iOS app I see? Very nice. Good work.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2
    Yeah, you both were right. Using layers helped me solve the problem. Thanks a lot!

  3. #3
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Hey don't sweat it. Sometimes we all look for complicated solutions when a simple one would have sufficed. I've done this on many an occasion. I'm really starting to notice in some of my older projects from a few years back now.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •