Results 1 to 2 of 2

Thread: Depth Buffer in MesaGL

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    Cali, Colombia
    Posts
    5

    Depth Buffer in MesaGL

    Sorry my english,

    I want to know how i use the depth buffer in Linux, i make all the things right (The same code runs in windows); i use glut and mesaGL, lastest libraries.

    Thanks,

    Nicolas

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Caracas/Venezuela
    Posts
    182

    Re: Depth Buffer in MesaGL

    This is mostly an OS independent question.
    The OS dependent part is that you have to request a depth buffer when initializong your windows for OpenGL, but if you use glut, then it is super easy. The line
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
    will do it.

    Then, you have to glEnable(GL_DEPTH_TEST) (i guess you more than knew this...), and make sure your projection matrix is properlly setup to give some decent precision for the zbuffer (setting the near plane greater than 0, and the far plane not too far, see gluPerspective). Of course, there are other functions to fine tune depth testing, but the are set by default to reasonable values that work.

    I dont know what's your level in this matter, but at least this is the very basic. let me know more about your app.

Similar Threads

  1. Framebuffer depth test with depth and stencil buffer
    By moldyviolinist in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 07-29-2013, 08:21 PM
  2. Depth buffer reading and depth buffer test
    By BurningLegion in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-15-2007, 04:09 AM
  3. depth buffer -> depth texture -> depth buffer
    By Codemonkey in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 12-23-2005, 06:27 AM
  4. How can get MesaGL lib?
    By lgnnn in forum OpenGL: Linux
    Replies: 3
    Last Post: 04-01-2003, 04:04 PM
  5. why depth buffer save to image file can not display depth information
    By victorswan in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-27-2001, 09:19 PM

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