there is an exemple of how to use multiple texture / textunit in the gem exemple folder, in directory 10.GLSL
Matteo Sisti Sette a écrit :
Wow wow wow!!!
It seems my underflow problem (now I was getting both underflows and overflows) is in some way related to the use of texunits AND [gemframebuffer]s.
I still have to understand how exactly the texunit thingie works (the "texunit" message to [pix_texture] is not even documented btw), but I had been able to use texunits in order to assign textures a "texunit" and then refer to these numbers in the shader code to access textures, without problems until I began to use them in addition to gemframebuffers (without suspecting they could interact).
Well now I have just realized that [gemframebuffer] outputs a message like "using texunit N", and I had some messages like this:
[loadbang] | [texunit 0( // or 1 | [pix_texture]
So I guess I was assigning this texture the same texunit that was used by the gemframebuffer; I still have to figure out what it means but I guess it is not good.
Removing the texunit messages, now the stack under/overflows seem to have disappeared.
Thanks again for your help
m.