Results 1 to 2 of 2

Thread: Problem with glTexCoord2d()

  1. #1
    Newbie Newbie
    Join Date
    Mar 2017
    Posts
    1

    Problem with glTexCoord2d()

    Hi everyone !

    I'm new to OpenGL and not an english native speaker (Don't judge me ! ).
    I'm trying to make a floor with a texture. For the moment I'm drawing a square this way :

    glBegin(GL_QUADS);
    glTexCoord2d(0, 0); glVertex3d(0, 0, 0);
    glTexCoord2d(10, 0); glVertex3d(1000, 0, 0);
    glTexCoord2d(10, 10); glVertex3d(1000, 0, 1000);
    glTexCoord2d(0, 10); glVertex3d(0, 0, 1000);
    glEnd();

    The problem is that the texture isn't repeated ! I'm using binding from SFML, so maybe SFML doesn't allow to repeat a texture, but it seems strange...

    But seems being stretched (Not on all the floor, but only on a line) instead of repeated !

    Thanks for your help !

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    3,112
    It's possible that SFML is explicitly setting the wrap mode to clamp. Use glTexParameter() to set it to repeat.

Similar Threads

  1. OpenGL texture glTexCoord2d is not drawing
    By ricardoul in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-03-2017, 01:54 PM
  2. Replies: 1
    Last Post: 09-23-2016, 02:24 PM
  3. Shading problem? (pyglet-problem?, my problem?)
    By H2OBrain in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-03-2009, 08:31 AM
  4. Replies: 4
    Last Post: 09-27-2004, 06:27 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