Texture mapping anomaly opengl

This is a discussion on Texture mapping anomaly opengl within the Game Programming forums, part of the General Programming Boards category; Im rusty at OpenGL but didnt think i was this rusty. I have an anomaly with texture mapping in OpenGL. ...

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    1,200

    Texture mapping anomaly opengl

    Im rusty at OpenGL but didnt think i was this rusty. I have an anomaly with texture mapping in OpenGL.

    I use OGL under SDL, but it seems like the glTexCoord2f produces some weird result, when i should have 0.0 I need to have 0.0+1.0/textureWidth, when i should have 1.0 i need to have 1.0-1.0/textureWidth and so on. That is I get a "frame" around my texture that is 1 pixel wide and it has the color which should be on the exact opposite side of the quad.


    I am using Debian Linux, fluxbox, SDL, OpenGl and DevIL in my application. I have tried loading both a png image and a bmp image but they both produce the same result.

    Anybody has any suggestions and has had similar problems earlier? Is it DevIL that makes it troublesome for me?

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,200
    Solved!

    Damn i feel stupid. I used the GL_LINEAR MIN and MAG filter for the texture and thats what casued it, when I used the GL_NEAREST filter instead it worked as expected.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL texture mapping with texCoordArray
    By nempo in forum Game Programming
    Replies: 1
    Last Post: 08-24-2008, 04:00 AM
  2. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  3. Texture mapping in OpenGL
    By Dragon in forum Game Programming
    Replies: 5
    Last Post: 10-19-2003, 09:47 AM
  4. Texture mapping in OpenGL
    By Mithoric in forum Game Programming
    Replies: 3
    Last Post: 09-12-2003, 09:03 AM
  5. OpenGL texture mapping problems.
    By KnightSword in forum Game Programming
    Replies: 2
    Last Post: 07-12-2002, 10:26 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21