X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Finstancearray.cpp;h=231bebe1beaabe28df632d9dc0ce1f1b58db0109;hb=91e65bc9e24a6889995081035f6f6f0a78a6c20e;hp=028af3ad1ca088e2b92eabfb9765c01a30367f6b;hpb=ea7832c7c1ffab00cc1168bc8c41375fdd0eae86;p=libs%2Fgl.git diff --git a/source/render/instancearray.cpp b/source/render/instancearray.cpp index 028af3ad..231bebe1 100644 --- a/source/render/instancearray.cpp +++ b/source/render/instancearray.cpp @@ -44,9 +44,9 @@ InstanceArray::InstanceArray(const Object &o): if(ARB_vertex_array_object && ARB_instanced_arrays && ARB_draw_instanced) { - instance_data = new VertexArray((ATTRIB4,matrix_location, ATTRIB4,matrix_location+1, ATTRIB4,matrix_location+2)); + instance_data = new VertexArray((RAW_ATTRIB4,matrix_location, RAW_ATTRIB4,matrix_location+1, RAW_ATTRIB4,matrix_location+2)); const VertexFormat &fmt = instance_data->get_format(); - matrix_offset = fmt.offset(make_indexed_attribute(ATTRIB4, matrix_location)); + matrix_offset = fmt.offset(make_indexed_attribute(RAW_ATTRIB4, matrix_location)); instance_buffer = new Buffer(ARRAY_BUFFER); instance_data->use_buffer(instance_buffer); @@ -62,7 +62,7 @@ InstanceArray::InstanceArray(const Object &o): InstanceArray::~InstanceArray() { - for(std::vector::iterator i=instances.begin(); i!=instances.end(); ++i) + for(vector::iterator i=instances.begin(); i!=instances.end(); ++i) delete *i; delete vtx_setup; delete instance_data; @@ -112,7 +112,7 @@ void InstanceArray::update_instance_matrix(unsigned index) d[matrix_offset+i] = m(i/4, i%4); } -void InstanceArray::render(Renderer &renderer, const Tag &tag) const +void InstanceArray::render(Renderer &renderer, Tag tag) const { if(instances.empty()) return;