Results 1 to 4 of 4

Thread: glcommands and texture units

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

    glcommands and texture units

    Where can I find a list of all the glcommands that only affect the currently enabled
    texture unit? What commands ignore this and affect all texture units?

    I already know that these gl commands are specific to the texture unit:
    glBindTexture( GL_TEXTURE_2D, texture_id );
    glDisable( GL_TEXTURE_2D );
    glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
    glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
    glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );


    What about glEnable(GL_ALPHA_TEST) ?

  2. #2
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: glcommands and texture units

    Alpha test is not a texture operation, I think this is indicative of the confusion. All texture operations affect the current texture unit, unless another is explicitly provided as a parameter.

    There's a big foldout diagram at the back of the blue book that describes the stages in the OpenGL pipeline, it shoudl help you with this sort of thing. It's probably online somewhere.

    Usually the question people ask is which texture state is stored in the texture object and restored with a bind call, but that's a different question

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

    Re: glcommands and texture units

    Thanks, I understand a little better now. I found the blue book, but it looks like
    someone hacked it up into a bunch of HTML pages. No diagram found.

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

    Re: glcommands and texture units

    No worries. The fixed function fragment pipe goes something like this:

    Input: parameters from triangle interpolator
    ->(Multi)texturing
    ->Color sum
    ->fog
    ->alpha test
    ->depth and stencil
    ->blending or logic op

    The result will then be written to the framebuffer if it passed alpha, depth and stencil tests.

Similar Threads

  1. Texture Units and Mixing - Only One Texture Rendering
    By OneCleverGorilla in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-24-2017, 07:26 AM
  2. Texture units
    By ei05tbe in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-06-2010, 10:43 AM
  3. Texture units
    By Tomy in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-20-2005, 07:55 AM
  4. GlCommands Feature in Md2 files
    By Antorian in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 08-21-2002, 01:19 AM
  5. Texture units.
    By Sylvain in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 05-23-2000, 05:08 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