The menu system and osggraph modules have a texture unit conflict: https://sourceforge.net/p/speed-dreams/mailman/message/32438292/
(Note: I'm not an OpenGL or OSG expert, so I may be completely wrong. :)
One possible solution reworks the menu system to be compatible with osggraph. I don't agree with approach but I investigated it anyway. The menu code is in src/libs/tgfclient. The code never calls glActiveTexture() so the texture unit is GL_TEXTURE0. The code does call glTexCoord() in lots of places, which always uses GL_TEXTURE0. This blocks simply switching the menu system to another texture unit. I stopped investigating at this point since its not obvious how to proceed
Osggraph uses at least GL_TEXTURE0-3, but those are the explicitly assigned uses that I found by guessing the functions that may be used to set texture units. Texture units are also hardcoded in lots of places which is awkward. I hope Gaëtan knows exactly which units were used and where. The next big question is: does OSG use GL_TEXTURE0 by default anywhere?
Log in to post a comment.