What's the preferred way to switch textures of a quad?

Hi,

I'm drawing a grid right now with textured quads.

Normally, a grid cell has one texture, but when the user rolls the mouse over a gridcell, that cell should change to another texture, and when the user clicks it, it should change to yet another texture.



Is there a preferred way to switch out textures back and forth in jME?



Right now I'm using three cascading Nodes with Texturing RenderStates, which I'm enabling and disabling back and forth.



I could also create three quads with different textures, and attach and disattach them back and forth.



Is there a standard way of doing this?

  -Cuppo

hi,



i simple way is to create 2 texturestates and attach the different textures to each one. then u can set the first texturestate for the first texture on your object and the other texstate with the second texture if needed and back again the first texstate and so on.


BlackBluegL said:

hi,

i simple way is to create 2 texturestates and attach the different textures to each one. then u can set the first texturestate for the first texture on your object and the other texstate with the second texture if needed and back again the first texstate and so on.




i think thats the prefered way as renanse told me once before, but that was a long time ago.

Okay, I'll just do it that way and switch it later if I run into a performance wall.

Thanks for your help.

  -Cuppo