tanzfisch / Igor

Igor Game Engine
http://igor.logasoft.co.nz/doxygen/index.html
GNU Lesser General Public License v3.0
7 stars 0 forks source link

black textures #324

Closed tanzfisch closed 1 year ago

tanzfisch commented 1 year ago

already had a look in to it. It seems to only happen with mip maps. I had a look at the mip map generation and there was indeed some issues but fixing them did not fix the issue of black textures. Need to dig deeper here.

tanzfisch commented 1 year ago

Seems that glGenerateTextureMipmap as well as using gluBuild2DMipmaps leads to some black textures. It also does not seem to be a driver issue since it breaks on Linux and Windows.

It seems it might be a race condition since restarting the same example different textures turn black.

tanzfisch commented 1 year ago

removing the physics module showed that the problems in the physics module have nothing to do with the texture issues.

tanzfisch commented 1 year ago

It seems that glGenerateTextureMipmap (also gluBuild2DMipmaps) doesn't always operate synchronously. Because of that the pixel data was sometimes deleted before the mipmap generation was completed. Adding a glFlush fixed it.

0.41.0