Probelms with multitexture vertex arrays
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 :
Can someone please help?
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?
What textures are bound, and what texture environments are you using?
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| ? Export Vertex Arrays from Gfx App ? | Elphaba | 2 | 2,496 |
Jun 11, 2009 12:39 PM Last Post: Elphaba |
|
| (OpenGL) How could I use MultiTexture ? | zookgems | 2 | 7,170 |
Jan 20, 2009 07:20 PM Last Post: zookgems |
|
| VBOs and Vertex Arrays in OpenGL not working | Talyn | 6 | 5,222 |
Jul 8, 2008 01:14 PM Last Post: Fenris |
|
| Display Lists or Vertex Arrays with texturing | seven | 6 | 3,316 |
Oct 17, 2005 09:24 AM Last Post: seven |
|
| Multitexture Crashes | Jake | 6 | 3,216 |
Sep 6, 2004 12:46 PM Last Post: Jake |
|

