Code review comment for lp:~linaro-graphics-wg/glmark2/desktop

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> > +protected:
> > +    void draw_quad_with_program(const GLfloat *position, const GLfloat
> *texcoord,
> > +                                Program &program)
>
> Why not make this take "const vector<vec2>& position" and "const
> vector<vec2>& texcoord"? Works just fine with the GL interfaces....

The reasons I am not keen on this are:

1. Currently (ie not C++11) there is no simple way to initialize a static const std::vector.
2. Due to the way the vector is going to be used in the function (&vector[0]), all safety benefits of using std::vector are essentially lost.
3. We don't really need a variable-size container in this case.

« Back to merge proposal