diff --git a/src/gpu/vertexbuffer.cpp b/src/gpu/vertexbuffer.cpp index 8901d2c3..9ebdaf56 100644 --- a/src/gpu/vertexbuffer.cpp +++ b/src/gpu/vertexbuffer.cpp @@ -156,13 +156,9 @@ void VertexDeclaration::DrawElements(MeshPrimitive type, int skip, int count) break; } #else + /* FIXME: this has nothing to do here! */ glFrontFace(GL_CCW); glEnable(GL_CULL_FACE); -# if defined HAVE_GL_2X && !defined __APPLE__ - /* FIXME: this has nothing to do here! */ - glEnable(GL_ALPHA_TEST); - glAlphaFunc(GL_GEQUAL, 0.01f); -# endif glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -181,10 +177,6 @@ void VertexDeclaration::DrawElements(MeshPrimitive type, int skip, int count) glDrawArrays(GL_POINTS, skip, count); break; } -# if defined HAVE_GL_2X && !defined __APPLE__ - /* FIXME: this has nothing to do here! */ - glDisable(GL_ALPHA_TEST); -# endif #endif } @@ -228,13 +220,9 @@ void VertexDeclaration::DrawIndexedElements(MeshPrimitive type, int vbase, break; } #else + /* FIXME: this has nothing to do here! */ glFrontFace(GL_CCW); glEnable(GL_CULL_FACE); -# if defined HAVE_GL_2X && !defined __APPLE__ - /* FIXME: this has nothing to do here! */ - glEnable(GL_ALPHA_TEST); - glAlphaFunc(GL_GEQUAL, 0.01f); -# endif glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -261,10 +249,6 @@ void VertexDeclaration::DrawIndexedElements(MeshPrimitive type, int vbase, glDrawElements(GL_POINTS, count, GL_UNSIGNED_SHORT, 0); break; } -# if defined HAVE_GL_2X && !defined __APPLE__ - /* FIXME: this has nothing to do here! */ - glDisable(GL_ALPHA_TEST); -# endif #endif } @@ -294,8 +278,6 @@ void VertexDeclaration::Unbind() } } glBindBuffer(GL_ARRAY_BUFFER, 0); - /* FIXME: only useful for VAOs? */ - //glBindBuffer(GL_ARRAY_BUFFER, 0); #else /* Or even: */ glDisableClientState(GL_VERTEX_ARRAY); diff --git a/src/gpu/vertexbuffer.h b/src/gpu/vertexbuffer.h index dfe01266..62d77735 100644 --- a/src/gpu/vertexbuffer.h +++ b/src/gpu/vertexbuffer.h @@ -171,7 +171,7 @@ public: class VertexDeclaration { public: - VertexDeclaration(VertexStreamBase const &s1, + VertexDeclaration(VertexStreamBase const &s1 = VertexStreamBase::Empty, VertexStreamBase const &s2 = VertexStreamBase::Empty, VertexStreamBase const &s3 = VertexStreamBase::Empty, VertexStreamBase const &s4 = VertexStreamBase::Empty,