Hello everyone.

I'm wondering how I should structure my scene graph, and how that relates to stencil shadows and shadow mapping. Currently I think stencil shadows require knowledge of the final transformed vertices in your java code, where I think this differs from shadow mapping is that you don't need knowledge of the vertices final positions in you code, but you can let opengl handle all that for you. I'm assuming that letting opengl handle the objects transforms with glTranslate etc, is faster then doing this my self in java with my own matrices, I've figured that if I do it in my own code that per node I will need to do 2 4x4 matrix multiplies which amounts to 128 multiplications and 128 additions, and then I would have to multiply this matrix times every vertex which is probably extremely slow, isn't it? Is there a way I can structure my scene graph to use opengls modelview transforms instead of setting the modelview to identity and doing the transforms myself? If I use opengls modelview transforms is there a way that I can get the transformed vertex data back in my program for stencil shadows?