I want to apply two texture to wall.I use projective texture and a wall texture in multitexturing.I don’t know how to apply projective texture effect to first texture and how to avoid that this effect get applied to second texture.I have a projtex.c opengl example.
Can I render a texture with coordinate generation to simulate a spotlight and a texture wall with no coordinate generation in multitexturing?
There is a texture matrix per texture unit which allows to do standard passthrough texture with the default identity for one and a projective texture matrix for another texture.
Look at glActiveTexture in a manual which uses OpenGL 1.2 or better.
The should be plenty of projective texture mapping examples out there, one is in the NVIDIA SDK for sure. Yes, here it is:
Ok, but nvidia demo show only one spotlight texture.
I need to apply two texture in the polygon:wall texture and spotlight texture.
Can I render in a single pass two texture in the wall, or I need multipass approach?
That depends on the available texture units and how many are used for other things like the model texture, light map DOT3, attenuation etc. The available texture unit varies with the hardware but these days most hardware has 4 texture units. The specifics of how you do the math by adding the light sources can be important too, but with combiners and other programmability it is possible to do what you want with the available textures.