Results 1 to 6 of 6

Thread: [OpenGL] What is wrong with my texture coordinates?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    First I have to say that this looks really odd indeed. I know the OpenGL V axis is flipped, but you allready took that into account.

    But it is hard for me to belive that this function is messing with the texture...
    You could always check the sources and verify this.

    Are you loading it as Bitmap or as TGA? Normally you would expect the first pixel to be the top-left one, but this might not be true, depending on your fileformat.

    Also you can check your camera. Maybe you should try drawing a fullscreen quad with glVertex2i() or something to rule out any transformation issues.

    Finally, it would help if you could post the full sources, if that's possible.

    Edit: I just checked your camera from the given source and it should be Ok. I know nothing about PNG actually. Maybe try BMP and see if that works differently?

    Edit2: I think the sollution to your issue can be found on this page (section 12 about 2D coordinates):
    http://www.opengl.org/resources/feat...es/oglpitfall/

    After reading this, I am not sure if OpenGL just flips the V axis, reads image-data upside down or BOTH! I'd like to know what causes your problem.
    Last edited by chronozphere; 18-02-2011 at 12:18 AM.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Bookmarks

Posting Permissions

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