Hi,

Given the texture "id" that comes from the second outlet of a [pix_texture] object, is there a way to retrieve its texunit number that I can use inside a shader to access the texture?

Forcing the pix_texture object to use a given texunit is becoming problematic for me because I am using some [gemframebuffer] and [pix_snap] objects and it seems they also "use" texunits. As far as I understand from the tests I have done, I can't simply assign arbitrary numbers to my textures (for example texunit 100, 101, 110, 111...): I need to know exactly how many texunits are "available" and "swap" them, but if I miss something I mess everything up. On the other hand, it seems like these texunits are kinda automatically assigned and menaged if you don't touch them - but then, I need a texunit number in order to access a texture from a shader...

... that's why I think I would solve my prolem if I could "retrieve" the texunit of a texture.....

thanks
m.

--
Matteo Sisti Sette
[email protected]
http://www.matteosistisette.com

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to