Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: glTexCoord2f and glMultiTexCoord2fARB

  1. #1
    Senior Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    680

    glTexCoord2f and glMultiTexCoord2fARB

    in my program, the following things happen:

    glActiveTextureARB(GL_TEXTURE0_ARB);
    ...
    glEnable(GL_TEXTURE_2D);
    ...
    glTexCoorf2f(...);

    and everything looks fine. I guess that when enabling only texture unit 0, glMultiTexCoord2fARB and glTexCoorf2f work just the same!? or why does my program look fine?

    Jan

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2002
    Location
    Nanjing,China
    Posts
    116

    Re: glTexCoord2f and glMultiTexCoord2fARB

    If everythings look fine. so what's your problem here,enn?

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    680

    Re: glTexCoord2f and glMultiTexCoord2fARB

    sounds right somehow.. i will go on working on it and post againg if it does not look fine anymore

    Jan

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jan 2003
    Posts
    147

    Re: glTexCoord2f and glMultiTexCoord2fARB

    Of course glTexCoord2f works when the texture unit is set to zero.
    Why shouldn't it? Everybody uses unit 0, regardless if you are doing
    multi-texturing or not.

    But I would only use glMultiTexCoord2fARB if you doing multi-texturing
    on more than 1 texture unit as that's what it's there for.

  5. #5
    Senior Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    680

    Re: glTexCoord2f and glMultiTexCoord2fARB

    i thought it could be a problem because there are parts in the scene of which some have multitexturing and others COULD have but in fact do not, and they are treated the same internally. so the parts who COULD have more than one texture but do not have use glMultiTexCoord2fARB while other parts of the scene, who definitley have only one texture, use glTexCoord2f. But it seems to work fine (as it looks fine).

    Jan

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Feb 2002
    Location
    Bonn, Germany
    Posts
    1,633

    Re: glTexCoord2f and glMultiTexCoord2fARB

    I see immediate mode more as a utility for prototyping and testing. Somewhat more finished code will probably use vertex arrays, and then the difference between unit 0 and higher units will vanish.

  7. #7
    Senior Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    680

    Re: glTexCoord2f and glMultiTexCoord2fARB

    what kind of difference do you mean? btw everything is inside of display lists..

    Jan

  8. #8
    Senior Member OpenGL Pro
    Join Date
    Feb 2002
    Location
    Bonn, Germany
    Posts
    1,633

    Re: glTexCoord2f and glMultiTexCoord2fARB

    Originally posted by JanHH:
    what kind of difference do you mean?
    Nothing big ... let's rehash this.
    In immediate mode you have two basic ways to specify unit 0 texcoords.
    1)glTexCoord*(...)
    2)glMultiTexCoord*ARB(GL_TEXTURE0_ARB,...)

    One could argue that the second option adds additional function call overhead and should be avoided, but that's borderline irrational. If you want performance, you shouldn't be using true immediate mode (as in "not a display list") in the first place. Hmmm. I see you have that one covered.

    However, there's no such alternative with vertex arrays. glTexCoordPointer always follows the selection made by glClientActiveTexture.

    So the difference is that a choice goes away.

    btw everything is inside of display lists..

    Jan
    Interesting. Geometry inside a display list behaves just like a vertex array in fast graphics memory, I'd say. I don't think it'll make any difference whatsoever in that case.

  9. #9
    Senior Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    680

    Re: glTexCoord2f and glMultiTexCoord2fARB

    before i started posting here i thougt that display lists are the best solution in terms of performance (if the geometry data is not too big), but when i wrote about that here, people seemed shocked *g*, one said "never use display lists" or "use them very rarely" but i never got explained WHY this should be the cause.

    Theoretically DL should be the fastest possible solution because every data is already inside of the graphics card memory, and also in a precompiled way. So does anyone know what is wrong with this and WHY vertex arrays are faster/better??

  10. #10
    V-man
    Guest

    Re: glTexCoord2f and glMultiTexCoord2fARB

    Originally posted by JanHH:
    Theoretically DL should be the fastest possible solution because every data is already inside of the graphics card memory
    There is no guarantee that this is true. The driver may use vertex array like calls to speed things up.

    Don't worry about performance if you started to learn GL.

Page 1 of 2 12 LastLast

Similar Threads

  1. glTexCoord2f simple questions
    By blessman11 in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 03-06-2011, 02:33 PM
  2. help understanding glTexCoord2f parameters
    By imported_xargon in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-05-2006, 06:38 AM
  3. Problems with glTexCoord2f(...)
    By TheBlackAdder in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-17-2005, 02:41 AM
  4. glTexCoord2f help with loader!!
    By bansheeogl in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 06-06-2005, 07:09 PM
  5. glTexCoord2f()
    By jankri in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-24-2001, 08:41 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