Original Post
I'm having a problem with my VBO objects that have multi textures. When I was using 1 texture everything seemed to work. Since my geometry is displaying i will ommit the vertex and color code since this all works. So basically I have it isolated to either my UV buffers or Texture stuff. I am really new to the whole multi texture thing. Also without multi-texture my textures did display. I think that's it... Then it all comes down to the same draw call. I edited the code so there may be syntax error, but i assure you it compiles... what I really need to understand is how to use multi-texture exstension. Any help would be greatly appreciated! [Edited by - Matsy on March 15, 2005 11:47:10 AM]
//When i create the Texture...
glGenTextures(1,&textureid);
glBindTexture(GL_TEXTURE_2D,textureid);
glTexImage2D(GL_TEXTURE_2D,mips,GL_RGBA,width_p2,height_p2,0,GL_RGBA,GL_UNSIGNED_BYTE,buffer);
//When i create the UV buffer
glGenBuffersARB(1,&bufferid);
glBindBufferARB(GL_ARRAY_BUFFER_ARB,bufferid);
glBufferDataARB(GL_ARRAY_BUFFER_ARB,size*sizeof(ldmath::Vector2),buffer,GL_STATIC_DRAW_ARB);
//When i set the texture
//(When not power of 2 is not supported _p2
//is not a power of 2 and the buffer reflects the same
glActiveTextureARB(GL_TEXTURE0_ARB + channel);
glBindTexture(GL_TEXTURE_2D,textureid);
glEnable(GL_TEXTURE_2D);
//When i set my UV buffer...
//channel is from [0-n]
glClientActiveTextureARB(GL_TEXTURE0_ARB + channel);
glBindBufferARB(GL_ARRAY_BUFFER_ARB,bufferid);
glTexCoordPointer(2,GL_FLOAT, 0, BUFFER_OFFSET(offset));
glEnableClientState(GL_TEXTURE_COORD_ARRAY);