Page 1 of 1

Wrong textures rendered

Posted: Mon Aug 19, 2019 12:25 am
by archee
Hello,

In my render loop I cycle through the textures used in the scene:

for(int texi=0;texi<textureCount;texi++) {
glBindTexture(GL_TEXTURE_2D, textures[texi]);
glDrawElements(GL_TRIANGLES, ... );
}

I'm getting wrong textures rendered in may batches unless I put a glFlush() in the loop, which makes it very slow.
My SDL2 G ES app works fine on PI 3 and many other platforms including XU4Q, Android, iPad

Any ideas?

Re: Wrong textures rendered

Posted: Mon Aug 19, 2019 4:16 am
by archee
The textures are fixed, if I call glVertexAttribPointer within the loop after each texture change. Is there a way to let the opengl driver makers know about this bug?

Re: Wrong textures rendered

Posted: Fri Aug 23, 2019 6:55 pm
by dividuum

Re: Wrong textures rendered

Posted: Sun Sep 01, 2019 12:25 pm
by archee
That's right. Putting the latest MESA in Raspbian will solve the problem.