PDA

View Full Version : GL_QUAD_STRIP Texturing



Amir
12-19-2004, 01:03 PM
Hello Guys.
How can I use various textures on GL_QUAD_STRIP?
I downloaded this tutorial and changed it to GL_QUAD_STRIP, but I couldn't use various textures for every quad.
http://codesampler.com/source/ogl_optimized_mesh.zip
and thanks to Kevin R. Harris ( codesampler tutorials Author )

MikeC
12-19-2004, 04:11 PM
No, only one texture per glBegin/glEnd pair. (Unless you're using multitexturing, but I don't think that's what you're asking for.)

zukko
12-20-2004, 01:56 PM
i suppose you have to use GL_QUADS and bind every texture before it for example


for(int i=0;i<4;++i)
{
glBindTexture(GL_TEXTURE_2D,texture[i];
glBegin(GL_QUADS);
.....
glEnd();
}

Amir
12-22-2004, 03:14 PM
I want to create a terrain with various textures such as water, clay, grass, sand, ...( about 48 textures).
My grid is large and for more performance I create a grid with GL_QUAD_STRIP instead of GL_QUADS.
With GL_QUADS I can use seperate textures for every quad, but with GL_QUAD_STRIP
I can use only one texture for all quads.
How can I create a height map with best performance and a seperate texture for every quad?