fix bug in getNumElements that kept it from working on buffer-views with a non-zero offset

This commit is contained in:
Seth Alves 2017-07-23 08:05:09 -07:00
parent 6f86b266cb
commit 6e0394865e

View file

@ -192,7 +192,7 @@ public:
BufferView(const BufferPointer& buffer, Size offset, Size size, const Element& element = DEFAULT_ELEMENT);
BufferView(const BufferPointer& buffer, Size offset, Size size, uint16 stride, const Element& element = DEFAULT_ELEMENT);
Size getNumElements() const { return (_size - _offset) / _stride; }
Size getNumElements() const { return _size / _stride; }
//Template iterator with random access on the buffer sysmem
template<typename T>