PDA

View Full Version : please, help with Multitex and vertex arrays



KlaHyMan
05-07-2000, 12:11 PM
I'd like to use multitexturing to add a lightmap and a texture to my terrain model, which is currently rendered with compiled vertex array. The problem is that the second unit doesn't seem to be working.
Here are my steps:
load the two textures and bind them with separate IDs;
enable unit one,bind lightmap and enable texture coordinate array (glEnableClientState);
enable unit two, bind texture and enable tex coord array with appropriate pointer.
Lightmap is actually a LUMINANCE texture, while the base tex is in format RGBA. Lightmap is clamped while the other tex is repeated.
Can you give me some hint? I'm quite desperate. I've tried to disable unit one and use only unit two, but I get a uniform color. If I switch back to unit one and use exactly the same code the texture is displayed correctly.
I'm developing on a geforce, so I dont think the problem is the driver/card.