X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fvertexsetup.cpp;h=55424d6caf41eb9979f2de294547cf7f13fd210a;hb=009918e76dda88b0cb68fdaa20c63d6e952af260;hp=0971aed1c62f08c8c2823e873bcf86ce5ba15ba4;hpb=a4d83d3748cdde8cf30683d36a040d3dfacfd693;p=libs%2Fgl.git diff --git a/source/core/vertexsetup.cpp b/source/core/vertexsetup.cpp index 0971aed1..55424d6c 100644 --- a/source/core/vertexsetup.cpp +++ b/source/core/vertexsetup.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -10,8 +9,6 @@ #include "buffer.h" #include "deviceinfo.h" #include "error.h" -#include "gl.h" -#include "misc.h" #include "vertexarray.h" #include "vertexsetup.h" @@ -105,7 +102,7 @@ bool VertexSetup::verify_format(const VertexFormat &fmt) if(fmt.empty()) return false; - unsigned max_attribs = Limits::get_global().max_vertex_attributes; + unsigned max_attribs = DeviceInfo::get_global().limits.max_vertex_attributes; for(VertexAttribute a: fmt) if(get_attribute_semantic(a)>=max_attribs) @@ -137,9 +134,9 @@ void VertexSetup::update() const if(dirty&INDEX_BUFFER) { if(direct) - glVertexArrayElementBuffer(id, index_buffer->get_id()); + glVertexArrayElementBuffer(id, index_buffer->id); else - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer->get_id()); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer->id); } dirty = 0; @@ -150,14 +147,14 @@ void VertexSetup::update_vertex_array(const VertexArray &array, unsigned binding if(!direct) { Buffer::unbind_scratch(); - glBindBuffer(GL_ARRAY_BUFFER, array.get_buffer()->get_id()); + glBindBuffer(GL_ARRAY_BUFFER, array.get_buffer()->id); } const VertexFormat &fmt = array.get_format(); unsigned stride = fmt.stride(); if(direct) { - glVertexArrayVertexBuffer(id, binding, array.get_buffer()->get_id(), 0, stride); + glVertexArrayVertexBuffer(id, binding, array.get_buffer()->id, 0, stride); glVertexArrayBindingDivisor(id, binding, divisor); }