Probelms with multitexture vertex arrays

Bossa Nova
Unregistered
 
Post: #1
I'm setting up two texture coord arrays in opengl for texture units one and two. I do this with glClientActiveTextureARB.

With one unit everything works fine. My initial texture displays with the proper texture coords. However, when I enable unit two rather than displaying the new texture with the first, the first is displayed again with the coords in the second texture coordinate array. I can't seem to get the second texture to display at all.

I'm sure my units are set up right because the texturing works fine in immediate mode. Below is the code I use to set up the texture arrays :

Code:
glActiveTextureARB(GL_TEXTURE1_ARB);
    glClientActiveTextureARB(GL_TEXTURE1_ARB);
    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    glTexCoordPointer(2, GL_FLOAT, sizeof(terrainVertex), &vertexList[0].s1);

    
    glActiveTextureARB(GL_TEXTURE0_ARB);
    glClientActiveTextureARB(GL_TEXTURE0_ARB);
    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    glTexCoordPointer(2, GL_FLOAT, sizeof(terrainVertex), &vertexList[0].s);



Can someone please help?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
What textures are bound, and what texture environments are you using?
Quote this message in a reply
Bossa Nova
Unregistered
 
Post: #3
>>What textures are bound, and what texture environments are you using?

I've got textures bound to units zero and one.

Zero uses decal and one uses blend.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  ? Export Vertex Arrays from Gfx App ? Elphaba 2 2,939 Jun 11, 2009 12:39 PM
Last Post: Elphaba
  (OpenGL) How could I use MultiTexture ? zookgems 2 8,687 Jan 20, 2009 07:20 PM
Last Post: zookgems
  VBOs and Vertex Arrays in OpenGL not working Talyn 6 6,498 Jul 8, 2008 01:14 PM
Last Post: Fenris
  Display Lists or Vertex Arrays with texturing seven 6 3,850 Oct 17, 2005 09:24 AM
Last Post: seven
  Multitexture Crashes Jake 6 3,629 Sep 6, 2004 12:46 PM
Last Post: Jake