Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
In your code you need 4 texture coords; one for each vertexposition in vertices.
tex_coord[2] & text_coord[3] are the same, even though they are for different vertices.
Change text_coord[2] to 1.0,0 ; should fix the problem.
In your code you need 4 texture coords; one for each vertex in vertices.
In your code you need 4 texture coords; one for each position in vertices.