I’m having an issue rendering 2D on top of 3D: the vertex colour I’m setting for 2D content is getting used for 3D content as well.
What I’m doing, per frame:
- setup 3D
- draw a mesh with no vertex colours using glDrawArrays
- setup 2D
- draw a quad with vertex colour
The 3D content is being rendered correctly as far as the geometry is concerned, but all vertices use the colour I’m setting in 2D (i.e. if I draw a blue filled rectangle in 2D, the 3D teapot is also blue). 2D content appears normal.
When rendering the 3D mesh, I’m disabling colour arrays:
Am I doing something wrong?
Thanks a lot,