Changeset 2082 for trunk


Ignore:
Timestamp:
Nov 17, 2012, 2:24:47 PM (7 years ago)
Author:
sam
Message:

gpu: remove some crap from vertexbuffer.cpp and allow for
empty vertex declarations even though many video card
drivers do not support them — and they should.

Location:
trunk/src/gpu
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/vertexbuffer.cpp

    r2030 r2082  
    157157    }
    158158#else
     159    /* FIXME: this has nothing to do here! */
    159160    glFrontFace(GL_CCW);
    160161    glEnable(GL_CULL_FACE);
    161 #   if defined HAVE_GL_2X && !defined __APPLE__
    162     /* FIXME: this has nothing to do here! */
    163     glEnable(GL_ALPHA_TEST);
    164     glAlphaFunc(GL_GEQUAL, 0.01f);
    165 #   endif
    166162    glEnable(GL_BLEND);
    167163    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     
    182178        break;
    183179    }
    184 #   if defined HAVE_GL_2X && !defined __APPLE__
    185     /* FIXME: this has nothing to do here! */
    186     glDisable(GL_ALPHA_TEST);
    187 #   endif
    188180#endif
    189181}
     
    229221    }
    230222#else
     223    /* FIXME: this has nothing to do here! */
    231224    glFrontFace(GL_CCW);
    232225    glEnable(GL_CULL_FACE);
    233 #   if defined HAVE_GL_2X && !defined __APPLE__
    234     /* FIXME: this has nothing to do here! */
    235     glEnable(GL_ALPHA_TEST);
    236     glAlphaFunc(GL_GEQUAL, 0.01f);
    237 #   endif
    238226    glEnable(GL_BLEND);
    239227    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     
    262250        break;
    263251    }
    264 #   if defined HAVE_GL_2X && !defined __APPLE__
    265     /* FIXME: this has nothing to do here! */
    266     glDisable(GL_ALPHA_TEST);
    267 #   endif
    268252#endif
    269253}
     
    295279    }
    296280    glBindBuffer(GL_ARRAY_BUFFER, 0);
    297     /* FIXME: only useful for VAOs? */
    298     //glBindBuffer(GL_ARRAY_BUFFER, 0);
    299281#else
    300282    /* Or even: */
  • trunk/src/gpu/vertexbuffer.h

    r1963 r2082  
    172172{
    173173public:
    174     VertexDeclaration(VertexStreamBase const &s1,
     174    VertexDeclaration(VertexStreamBase const &s1 = VertexStreamBase::Empty,
    175175                      VertexStreamBase const &s2 = VertexStreamBase::Empty,
    176176                      VertexStreamBase const &s3 = VertexStreamBase::Empty,
Note: See TracChangeset for help on using the changeset viewer.