Results 1 to 9 of 9

Thread: How to draw one texture fewtimes on one shape, in stead of make it larger

  1. #1
    Member Contributor
    Join Date
    Nov 2002
    Location
    Oirsbeek,Holland
    Posts
    69

    How to draw one texture fewtimes on one shape, in stead of make it larger

    How to draw one texture fewtimes on one shape, in stead of make it larger.

  2. #2
    Junior Member Newbie
    Join Date
    Nov 2002
    Posts
    20

    Re: How to draw one texture fewtimes on one shape, in stead of make it larger

    I think all you have to do is specify coordinates bigger than one...like this maybe on a quad?

    glTexCoord2f(2,2);
    glTexCoord2f(0,2);
    glTexCoord2f(0,0);
    glTexCoord2f(0,2);

    would draw it 4 times if im correct.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Fort Collins, Colorado
    Posts
    446

    Re: How to draw one texture fewtimes on one shape, in stead of make it larger

    Also, make sure you set the texture wrapping mode to GL_REPEAT.

  4. #4
    Member Contributor
    Join Date
    Nov 2002
    Location
    Oirsbeek,Holland
    Posts
    69

    Re: How to draw one texture fewtimes on one shape, in stead of make it larger

    how could i set the wrapping model to GL_REPEAT

  5. #5
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Fort Collins, Colorado
    Posts
    446

    Re: How to draw one texture fewtimes on one shape, in stead of make it larger

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);

    Page 410 of the Redbook.

  6. #6
    Member Contributor
    Join Date
    Nov 2002
    Location
    Oirsbeek,Holland
    Posts
    69

    Re: How to draw one texture fewtimes on one shape, in stead of make it larger

    what different does it make, it works without it also

  7. #7
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Princeton, NJ
    Posts
    380

    Re: How to draw one texture fewtimes on one shape, in stead of make it larger

    If it does't matter it's because the default behavior is GL_REPEAT, however, it's probably good to get in the habit of setting such things because there may come a time when the default behavior is not what you want.

  8. #8
    Member Contributor
    Join Date
    Nov 2002
    Location
    Oirsbeek,Holland
    Posts
    69

    Re: How to draw one texture fewtimes on one shape, in stead of make it larger

    can you please tell me, what could be other setting of wrapping ?

  9. #9
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: How to draw one texture fewtimes on one shape, in stead of make it larger

    Why not look in some documentations? There are lots of them on the net, and it isn't that hard to find them. Anyways, the other wrapping modes are GL_CLAMP, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER and GL_MIRRORED_REPEAT.

Similar Threads

  1. Should I create a VAO and a VBO for each shape I want to draw?
    By powerseed in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-28-2019, 09:50 PM
  2. Replies: 1
    Last Post: 07-24-2014, 04:59 PM
  3. deleting only larger mipmap levels from a texture
    By eulauser in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-29-2014, 09:23 PM
  4. draw and color the shape of a house:)
    By deenabella in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-14-2011, 02:33 PM
  5. How to make a buffer to draw on but not render
    By Schlogenburg in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-02-2000, 01:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean