Changeset 207


Ignore:
Timestamp:
Sep 10, 2010, 12:26:40 AM (10 years ago)
Author:
sam
Message:

Proper depth buffer handling with minimal alpha support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/video.cpp

    r186 r207  
    3434    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
    3535    glClearDepth(1.0);
    36     glDisable(GL_DEPTH_TEST);
     36
     37    glEnable(GL_DEPTH_TEST);
    3738    glDepthFunc(GL_LEQUAL);
    38     glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
    39 
     39    glEnable(GL_ALPHA_TEST);
     40    glAlphaFunc(GL_GEQUAL, 0.01f);
    4041    glEnable(GL_BLEND);
    4142    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     43
     44    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
    4245
    4346    /* Projection matrix: once and for all */
Note: See TracChangeset for help on using the changeset viewer.