Results 1 to 3 of 3

Thread: Problems with Multi-Texturing

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2002
    Posts
    28

    Problems with Multi-Texturing

    I have a strange problem with multi-texturing. I have a menu, and I have about 5 textures I use for that, all in bmp form and they all work without any problems. Then on my main scene (it's a terrain editor btw) i have the terrain be a texture and I want to be able to use different textures for the different tiles. But, whenever I load the texture number, for example is texture[0] is grass and texture[5] is dust and I put:

    glBindTexture(GL_TEXTURE_2D, texture[0]);

    it loads the dust one, no matter what number i put in texture[i] it always loads the last one, being dust in this case, if grass was the last one it would load the grass. Anyone know why this is happening?
    Life's a bitch... you know the rest

  2. #2
    Member Contributor
    Join Date
    Jan 2001
    Posts
    59

    Re: Problems with Multi-Texturing

    I'm not really sure about this, but I do think the Red Book mentions the texture name 0 being special in the way that it load a "default" texture. The thing that rings my bell is that I use texture name 0 for unbinding textures. Maybe, something went wrong with your call to GenTextures. Use a debugger and check out what values you _really_ pass to glBindTextures.

  3. #3
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: Problems with Multi-Texturing

    thats if u use 0 for the texture ID
    ie
    glBindTexture(GL_TEXTURE_2D, 0);

    xero r u using glGenTextures ?
    if so post the texture loading code 9as long as its short)

Similar Threads

  1. Multi-Texturing and .... normal texturing?
    By Andy Gilbert in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-06-2010, 05:30 PM
  2. multi-texturing
    By Chan Min in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 05-02-2009, 02:49 PM
  3. problems with multi texturing (I think)
    By renaissanz in forum OpenGL: GLSL
    Replies: 5
    Last Post: 01-23-2006, 04:19 AM
  4. ATI Rage problems with multi-texturing, help PLZ!
    By kollision in forum OpenGL: User Software
    Replies: 0
    Last Post: 02-25-2002, 01:42 PM
  5. Multi Texturing
    By yossi in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 08-15-2000, 05:53 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