OpenGL multiple textures same surface, problem

Hello I’m trying to get multiple textures on the same big multi-polygon surface in openGL. to do this I use the glActiveTextureARB and glClientActiveTextureARB to set the texture (just 2 different textures I use, texture and focusedTexture), and set their correct coordinates and enable everything. After I set these up I call a lot of glDrawElements() to draw a surface.

However, the surface only has the LATTER texture that was enabled!

//excerpt of code

        glBindTexture(GL_TEXTURE_2D, texture);

        glTexCoordPointer(2, GL_FLOAT, 0, texCoords);

        glBindTexture(GL_TEXTURE_2D, focusedTexture);

        glTexCoordPointer(2, GL_FLOAT, 0, focusedTexCoords);

then I call

//excerpt of code
glColorPointer(3, GL_FLOAT, 0, 0);
glNormalPointer(GL_FLOAT, 0, 0);

then I have a for loop that calls a lot of times: glDrawElements(GL_QUAD_STRIP, 2*maxXres, GL_UNSIGNED_INT, quadIndices[i5]);

I even made a hotkey for debugging that switches between three states: case 1 tries to render both, case 2 tries to render texture only, case 3 tries to render focusedTexture only. Cases 2 and 3 both work but Case 1 only does whatever texture is enabled last (in this instance, focusedTexture). Help please.

edit: i also tried changing the modes of the GL_TEXTURE_ENV to GL_INCR or GL_ADD or GL_MODULATE to make sure it’s not just hidden behind the other texture, and still it doesn’t show up.

Those function calls are only part of the whole picture.
If you are using glTexEnv, here are examples:

If you want a debugger,

As for your half VBO and half non-VBO code, I don’t know if that works.

Also, I strongly recommend that you download some code. There are a lot of multitexturing examples out there (really old examples):

I already tried the default glTexEnv settings recommended by all the tutorials I read including replace and/or modulate etc. I’ll try those out when I get back to work but I seriously doubt they will change anything.

ok maybe

It works. Before I started doing multi-texturing I was already doing colors and vertices with VBO and texture non-vbo

I have already looked at half of these but I guess I’ll give it a shot, though I think they all contain basically the same tutorial