Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: GL_QUAD_STRIP Texturing

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2003
    Location
    Iran
    Posts
    11

    GL_QUAD_STRIP Texturing

    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 )
    Wm ES

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    562

    Re: GL_QUAD_STRIP Texturing

    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.)

  3. #3
    Junior Member Regular Contributor
    Join Date
    Jun 2004
    Location
    mexico
    Posts
    127

    Re: GL_QUAD_STRIP Texturing

    i suppose you have to use GL_QUADS and bind every texture before it for example
    Code :
    for(int i=0;i<4;++i)
    {
       glBindTexture(GL_TEXTURE_2D,texture[i];
       glBegin(GL_QUADS);
       .....
       glEnd();
    }

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2003
    Location
    Iran
    Posts
    11

    Re: GL_QUAD_STRIP Texturing

    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?
    Wm ES

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •