X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fvertexformat.cpp;fp=source%2Fcore%2Fvertexformat.cpp;h=908da99278defda2530f699aef308a90d116e99e;hp=65bbea49887ad82f1cdf4097204861bba79e197b;hb=6d33ca40415937790ed0cddc97148b5fbd90ccaf;hpb=2815449aa1c2a3c813f50ff85325cc2a3334430c diff --git a/source/core/vertexformat.cpp b/source/core/vertexformat.cpp index 65bbea49..908da992 100644 --- a/source/core/vertexformat.cpp +++ b/source/core/vertexformat.cpp @@ -3,9 +3,7 @@ #include #include #include "error.h" -#include "misc.h" #include "vertexformat.h" -#include using namespace std; @@ -95,11 +93,7 @@ VertexAttribute make_indexed_attribute(VertexAttribute attr, unsigned index) else if(attrGENERIC4) throw invalid_argument("make_indexed_attribute"); - static int max_attribs = -1; - if(max_attribs<0) - max_attribs = get_i(GL_MAX_VERTEX_ATTRIBS); - - if(static_cast((base>>3)+index)>=max_attribs) + if(static_cast((base>>3)+index)>=31) throw out_of_range("make_indexed_attribute"); return static_cast(base+index*8);