archee
Posts: 7
Joined: Fri Jan 13, 2012 10:07 pm
Contact: Website

Wrong textures rendered

Mon Aug 19, 2019 12:25 am

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?

archee
Posts: 7
Joined: Fri Jan 13, 2012 10:07 pm
Contact: Website

Re: Wrong textures rendered

Mon Aug 19, 2019 4:16 am

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?

User avatar
dividuum
Posts: 163
Joined: Sun Jun 16, 2013 1:18 pm
Location: Germany
Contact: Website

Re: Wrong textures rendered

Fri Aug 23, 2019 6:55 pm

info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

archee
Posts: 7
Joined: Fri Jan 13, 2012 10:07 pm
Contact: Website

Re: Wrong textures rendered

Sun Sep 01, 2019 12:25 pm

That's right. Putting the latest MESA in Raspbian will solve the problem.

Return to “OpenGLES”