I started with OpenGL ES 2.0 about two weeks ago. In the beginning using Vertexarrays seemed fine but now that I want to load .obj files I need to work with an indexed system.
I got the vertex- and indexbuffer code from an OpenGL ES starter book.
I tried to draw a square and everything works perfectly. Then I tried to add texture coordinates to my vertexdata the same way I did before with the vertexarray. The texture on the square only consists of weird lines and I have no idea why.
Both ways use the same basic texture shader and both can draw the vertices.
The error I get says: A vertex attribute index out of boundary is detected.
This is my indexed Table class:
I would greatly appreciate any help!