};
private:
+ struct Array
+ {
+ unsigned char component;
+ unsigned char offset;
+
+ Array();
+ };
+
VertexFormat format;
std::vector<float> data;
unsigned stride;
- std::vector<unsigned char> arrays;
+ std::vector<Array> arrays;
RefPtr<Buffer> vbuf;
bool defer_vbuf;
mutable bool dirty;
const float *operator[](unsigned i) const { return &data[0]+i*stride; }
void apply() const;
+private:
+ static void apply_arrays(const std::vector<Array> *, const std::vector<Array> *, const float *, unsigned);
};
} // namespace GL