Texture Mapping Trouble With Opengl

This is a discussion on Texture Mapping Trouble With Opengl within the Game Programming forums, part of the General Programming Boards category; I've been working on this all day... except for Russia: Land of the Tsars and a few games of halo. ...

  1. #1
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669

    Texture Mapping Trouble With Opengl

    I've been working on this all day... except for Russia: Land of the Tsars and a few games of halo. I used the base code from Nehe and created the multiple texture loading etc. Anybody know what's wrong here, because I sure don't... and I'm beginning to hate these smiling... smiley faces.

  2. #2
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669

    Sorry

    forgot to include stuff
    Last edited by drdroid; 06-03-2003 at 01:16 PM.

  3. #3
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669

    Scores:

    C'mon people, here's the score list:

    Downloads: 3
    Answers: 0

    We're still in the 3rd quarter, you can make it.

  4. #4
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    You were calling the wrong texturing funcitons

    This is what I changed to get it working correctly

    Code:
    	glBegin(GL_QUADS);
    	glTexCoord2f(0, 1);
    	  glVertex3f(-0.5, 0.5, 0.0);
    
    	glTexCoord2f(1, 1);
    	  glVertex3f(0.5, 0.5, 0.0);
    
    	glTexCoord2f(1, 0);
    	  glVertex3f(0.5, -0.5, 0.0);
    
    	glTexCoord2f(0, 0);
    	  glVertex3f(-0.5, -0.5, 0.0);
    	glEnd();

  5. #5
    drdrdoid
    Guest

    ?

    That didn't change anything.

  6. #6
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669
    Nevermind... the second smiley face comes up... but not the first one. I'll check the bmp file.

  7. #7
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    what do you mean didn't change anything...that fixed it...instead of the upside down smiley face patched twice on the polygon you've got one right side up smiley face...

  8. #8
    drdrdoid
    Guest

    True

    It did fix the smiley face... and as I look back at the tutorial that seems right... but the other image doesn't come up when I change the number.

  9. #9
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669

    ....

    If you can give me an aim/msn name, this can be alot quicker and easier.

  10. #10
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669

    Thanks all

    Now I know why they're smiling... I figured that I had to call:

    Code:
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
    			glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
    this for each texture. ::smacks forhead:: Anyway, thanks for all your help.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Texture mapping anomaly opengl
    By Shakti in forum Game Programming
    Replies: 1
    Last Post: 04-11-2009, 02:09 AM
  2. OpenGL texture mapping with texCoordArray
    By nempo in forum Game Programming
    Replies: 1
    Last Post: 08-24-2008, 04:00 AM
  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