solved issue with glDrawElements

when using glDrawElements the index buffer never gets bound. By adding
it to the bind method it gets added to the VAO state when VAO is used
or bound when not. To test use a VBO and and a mesh with setMesh and
draw with drawElements
Merge pull request #3123 from patrickFuerst/master

solved issue with glDrawElements