Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Want "glTextureNamePointer" !

  1. #1
    Intern Contributor
    Join Date
    Feb 2000
    Location
    Germany
    Posts
    87

    Want "glTextureNamePointer" !

    What I really dislike on using vertex-arrays is the leck of a method for changing the current texture within an array.
    At the moment you just can choose one of the following workarounds (at least I only know of these two methods - correct me if I'm wrong):
    a) create one big texture holding all your small ones. Problem: texture wrapping won't work.
    b) create one vertex array per texture. Problem: Sometimes kind of hard to implement.

    So, why isn't there a function like "glTextureNamePointer". The array it
    points to would just hold a sequence of
    texturenames used when binding the textures.

    Is there any not-so-easily-solveable problem with that, or why has a mechanism like that still not been implemented?

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: Want "glTextureNamePointer" !

    Yes, there's a good reason why this feature doesn't exist. On most hardware, changing a texture binding is one of the most expensive things you can do, and so you should try to do it as infrequently as possible. So a function to change texture binding per VERTEX is not going to get any serious use, and would just leave beginning OpenGL programmers scratching their heads and wondering why they're only getting 0.5 fps on their 1-GHz Athlon GeForce2 systems.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2000
    Posts
    26

    Re: Want "glTextureNamePointer" !

    What happens, if you change the texture binding during the specification of a triangle, triangle strip, triangle fan, ...?

    Something like:
    Vertex #1: Texture #1,
    Vertex #2: Texture #1,
    Vertex #3: Texture #2

    Kosta

  4. #4
    Intern Contributor
    Join Date
    Jun 2000
    Location
    Rostov-on-Don,Russia
    Posts
    50

    Re: Want "glTextureNamePointer" !

    And how will you do that ( without that topic function ) in normal OpenGL, not breakig the glBegin/glEnd scheme ?
    Aristarkh Zagorodnikov aka onyXMaster
    ICQ 36987938

Posting Permissions

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