float *modify(unsigned);
private:
virtual unsigned get_data_size() const;
- virtual void upload_data() const;
+ virtual const void *get_data_pointer() const { return &data[0]; }
public:
unsigned size() const { return data.size()/stride; }
const std::vector<float> &get_data() const { return data; }
const float *operator[](unsigned i) const { return &data[0]+i*stride; }
- void apply() const;
+ void bind() const;
+ void apply() const { bind(); }
private:
static void apply_arrays(const std::vector<Array> *, const std::vector<Array> *, const float *, unsigned);
+public:
+ static void unbind();
};
} // namespace GL