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: Texture glitch

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2017
    Posts
    3

    Question Texture glitch

    Click image for larger version. 

Name:	cube.jpg 
Views:	9 
Size:	19.8 KB 
ID:	2559
    Goodday, Sorry if this is already answered, could someone tell me what do one call this problem i'm having on that one face. and to what is it related, bad vertice location? Bad texture coordinate values?
    I'm using sdl2 with opengl, i've tried a lot of varients of glTexParameter's with no avail. Even trying to keep it simple by just having a plain with 4 vertices, it still seems that half(triangle) is textured. and the cube, 5 of the 6 faces is perfect and then that one side. Without posting all my code and create confusion, just let me know what portion of the code I should post to make resolving easier.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,515
    Quote Originally Posted by Pegi18 View Post
    Click image for larger version. 

Name:	cube.jpg 
Views:	9 
Size:	19.8 KB 
ID:	2559
    Goodday, Sorry if this is already answered, could someone tell me what do one call this problem i'm having on that one face. and to what is it related, bad vertice location? Bad texture coordinate values?
    The top two vertices have identical texture coordinates.

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2017
    Posts
    3

    Question

    Quote Originally Posted by GClements View Post
    The top two vertices have identical texture coordinates.
    thanks for the reply, but how would I go about fixing something simple as this plane?
    v 100.0 100.0 -1000.0
    v 100.0 -100.0 -1000.0
    v 100.0 -100.0 0.0
    v 100.0 100.0 0.0
    vt 0.0 0.0
    vt 0.0 1.0
    vt 1.0 0.0
    vt 1.0 1.0
    vn -1.0000 0.0000 -0.0000
    usemtl None
    s 1
    f 1/1/1 2/2/1 3/3/1 4/4/1
    Click image for larger version. 

Name:	plane.jpg 
Views:	3 
Size:	58.4 KB 
ID:	2560

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2017
    Posts
    3

    Smile

    Quote Originally Posted by Pegi18 View Post
    thanks for the reply, but how would I go about fixing something simple as this plane?
    v 100.0 100.0 -1000.0
    v 100.0 -100.0 -1000.0
    v 100.0 -100.0 0.0
    v 100.0 100.0 0.0
    vt 0.0 0.0
    vt 0.0 1.0
    vt 1.0 0.0
    vt 1.0 1.0
    vn -1.0000 0.0000 -0.0000
    usemtl None
    s 1
    f 1/1/1 2/2/1 3/3/1 4/4/1
    Click image for larger version. 

Name:	plane.jpg 
Views:	3 
Size:	58.4 KB 
ID:	2560
    After refering to other code, and debuging for the last 24hours, the problem when adding it to my glList one HAVE to past the texture coordinates FIRST then the vertex then the normals, mine were the same order as the face starting with vertex, texture, normal.

Posting Permissions

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