Changeset 728 for trunk


Ignore:
Timestamp:
Mar 7, 2011, 7:05:40 PM (11 years ago)
Author:
sam
Message:

gl: reactivate depth test and blending on GLES 1.x.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scene.cpp

    r705 r728  
    3737extern Shader *stdshader;
    3838#endif
    39 extern mat4 proj_matrix, view_matrix, model_matrix;
     39extern mat4 model_matrix;
    4040
    4141/*
     
    178178    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    179179#else
    180     //glEnable(GL_DEPTH_TEST);
    181     //glDepthFunc(GL_LEQUAL);
    182     //glEnable(GL_ALPHA_TEST);
    183     //glAlphaFunc(GL_GEQUAL, 0.01f);
    184     //glEnable(GL_BLEND);
    185     //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    186 
    187 #if 0
    188     /* Reset all model-view-projection matrices */
    189     glMatrixMode(GL_PROJECTION);
    190     glPushMatrix();
    191     glLoadIdentity();
    192     glMultMatrixf(&proj_matrix[0][0]);
    193 #endif
     180    glEnable(GL_DEPTH_TEST);
     181    glDepthFunc(GL_LEQUAL);
     182    glEnable(GL_ALPHA_TEST);
     183    glAlphaFunc(GL_GEQUAL, 0.01f);
     184    glEnable(GL_BLEND);
     185    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     186
    194187    glMatrixMode(GL_MODELVIEW);
    195188    glPushMatrix();
    196189    glLoadIdentity();
    197     //glMultMatrixf(&model_matrix[0][0]);
    198     glMultMatrixf(&view_matrix[0][0]);
     190    glMultMatrixf(&model_matrix[0][0]);
    199191
    200192    /* Set up state machine */
    201     glDisable(GL_DEPTH_TEST);
    202193    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    203194    glEnable(GL_TEXTURE_2D);
    204195    glEnableClientState(GL_VERTEX_ARRAY);
    205     glEnable(GL_BLEND);
    206     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    207196#endif
    208197
Note: See TracChangeset for help on using the changeset viewer.