Hello Vincenzo,
Vincenzo Marafioti wrote:
> I need to pass to a shader more than 16 textures (the hardware supports
> it). I use to "bind" them using the following command:
>
> cnkMat->subChunk(texOld , slot_unit);
>
> cnkMat->addChunk(texNew, slot_unit);
>
>
> The OSG log return me the following message:
>
> WARNING: addChunk: index 17 > Numslots 16, ignored!
>
>
> Browsing OpenSG source code i found the following define:
>
> #define osgMaxTexImages 16
>
>
> Is there any possibility to increase these value? Theorically if the
> hardware support it should be possible but I do not know how to do it in
> OpenSG.
hm, you should be able to just increase that number in OSGTextureChunk.h
(you are using OpenSG 1.x, right?) and recompile. That should allow you
to add more textures to a ChunkMaterial or more precisely the State
object it holds internally. Every State you create will have that many
slots for textures on it, so don't set it to some huge number, because
that will just waste memory (something like 32, if the hardware supports
that many textures should be ok though).
I'm not sure if we want to do this change for everyone though. How many
textures can hardware handle nowadays?
Cheers,
Carsten
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users