I am making a 2d game in opengl es 2.0
Inside are tons of rectangles defined by 4 points and one 4 component color.
I am using vertex buffer objects, and I have heard that it is efficent to interlace the data.
So like traditionally you would do
Corner.x
Corner.y
Corner.z
Corner.rgba
(repeat for each corner)
However in my situations two assumptions can be made that can probably make things faster
1. All the rectangles z values are 0
2. All corners of the rectangle have the same color.
Is it possible, and what would it look like to have a buffer object structured like this.
Corner.xy
Corner.xy
Corner.xy
Corner.xy
Color.rgba?
Is it even possible to have opengl assume that the Z is always 0? Is it possible to reuse the color like to hat?