Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Doing multitexturing with ARB_multitexture

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2000
    Livermore, CA USA

    Doing multitexturing with ARB_multitexture

    One serious question: how would one use it only *some* of the time?

    I'm planning to use it to implement glow mapping, by painting a texture shaded with glColorxx() and transfer mode GL_MODULATE, and then one with transfer mode GL_DECAL or GL_REPLACE.

    However, many of the textures will not be glow mapped, and I'd like to know how to shut down multitexturing when I don't need it.

    Finally, how widely-supported is ARB_multitexture? It's supported in Apple OpenGL; how well is it supported by various Windows and Linux OpenGL drivers?

  2. #2
    Junior Member Newbie
    Join Date
    May 2000

    Re: Doing multitexturing with ARB_multitexture

    That's a very good question. I'm having the same kind of problem. If worse comes to worse and there are no way to turn it off, then I guess one way is to set the "unused" texture units' environments to something that won't effect the final result.

    ...but I'm very keen on finding a better sollution as well.

  3. #3

    Re: Doing multitexturing with ARB_multitexture

    Here is the answer about using ARB_multitexture, About your first question, you really don't shut down multitexture. When your app starts you get the pointers to the multitexture functions and thats it, you never have to start anything. A really simple solution to your problem is to always render using multitexture, but only activate one texture and then activate the second when you need it. The problem with that is cards that don't support ARB_multitexture wont be able to run your app. Multitexture is only on when you want it to be on, you just have to issue the multitexture calls and multitexture will be used. Hope this helps somewhat, I don't know if I am repeating something you already know...


  4. #4
    Advanced Member Frequent Contributor cass's Avatar
    Join Date
    Feb 2000
    Austin, TX, USA

    Re: Doing multitexturing with ARB_multitexture

    What Nate said is right, but just to elaborate, the ARB_multitexture extension is only about getting access to other texture units. That is, in single texture OpenGL, you can think of there being only one texture unit. When you want texture on, you just specify a texture with glTexImage{12}D(...) then enable texturing via


    and you disable it with the corresponding glDisable() call. ARB_multitexture introduces the concept of an "active texture unit" (which defaults to GL_TEXTURE0_ARB) and
    each texture unit's state can be set by first setting it as the active texture unit, then using the regular OpenGL commands to specify the texture image, texture env, texgen, etc.

    That's really all there is to it. ARB_multitexture does include entry points for passing in texture coordinates because it would be unwieldy to have to keep changing the active texture and using glTexCoord() inside a tight rendering loop.

    So to answer your question more specifically, to turn off texturing in the second texture unit, just:


    Hope this helps...
    Cass Everitt --

Posting Permissions

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