Results 1 to 3 of 3

Thread: zbuffer problem - terrain not showing up on globe

  1. #1
    Guest

    zbuffer problem - terrain not showing up on globe

    Hello Everyone,

    I'm currently working on an openGL library for rendering terrain.

    I also have a seperate globe application that is using my library to display terrain on the surface of the earth.

    My problem is that if I disable the depth test, then my terrain appears with slight artifacts.

    With depth testing enabled my terrain does not show up.

    If I first clear the depth buffer, then draw with depth testing enabled that terrain shows up perfectly rendered. However this clobbering of the depth buffer affects the operation of the globe.

    I was wondering if there is another way I can get the terrain to render well without using the depth buffer? And also without sorting the polygons..


    Is there a quick way I can save and then restore the depth buffer, as to not affect the operation of the globe?

    Any help is aprecaited..


    jake

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2002
    Location
    St. Louis, MO USA
    Posts
    177

    Re: zbuffer problem - terrain not showing up on globe

    There is really no efficient way to save and restore the depth buffer, as far as I know.

    Can you go through all of the steps in your rendering pipeline that affect the depth buffer? Include any disables of depth test and depth write, any clearing of the depth buffer, and all drawing commands. ("draw globe" is sufficient - I dont need to see all of your calls to glBegin/glEnd or glDrawElements)

    There might be a way to use the stencil buffer to fix your problem, but I cant know for sure without knowing the exact steps in your pipeline.

  3. #3
    Guest

    Re: zbuffer problem - terrain not showing up on globe

    Thanks you for answering!

    I am going to look into the stencil buffer... I will post again after alittle bit of research


    Jake

Similar Threads

  1. Problem in window showing and hiding
    By Sasi_Opengl in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-16-2013, 12:57 AM
  2. Problem with showing anything on screen
    By joker40 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-07-2011, 11:18 AM
  3. problem with reading zBuffer on ATI
    By zwuocky in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-04-2009, 07:57 AM
  4. ZBuffer: Mistake or Problem
    By Powerino in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 09-18-2003, 07:25 AM
  5. ZBuffer problem?
    By kaysoft in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 10-03-2002, 11:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean