Results 1 to 3 of 3

Thread: TexEnv syntax?

  1. #1
    Senior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    410

    TexEnv syntax?

    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
    glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_DOT3_RGB_EXT);
    glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_PRIMARY_COLOR_EXT);
    glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND0_RGB_EXT, GL_SRC_COLOR);
    glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_TEXTURE);
    glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND1_RGB_EXT, GL_SRC_COLOR);

    I use this code to do my bumpmapping. When I go beyond 2 texture units, the last used unit, say 3, gets blended with the bumpmap instead of the 2nd unit. Why? I'm trying to get the 3rd texture unit to add to the previous two.

    If I can grasp the syntax of TexEnv, then coming up with solutions to other effects should be no problem.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: TexEnv syntax?

    Sure you have card that have three or more texture units?

  3. #3
    Senior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    California
    Posts
    410

    Re: TexEnv syntax?

    I just found out my GeForce2 only supports 2 units . I was under the impression that it supported up to 8 for some reason.

    Can you explain what GL_SOURCE0_RGB_EXT, GL_OPERAND0_RGB_EXT, GL_PRIMARY_COLOR_EXT, GL_SRC_COLOR and GL_TEXTURE are doing?

    I'm assuming all those commads only work when you set the env mode to combine. SO when you set it to modulate it doesn't do any of that stuff.

Similar Threads

  1. Multitexturing and TexEnv
    By Rodrix in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 04-18-2007, 01:30 AM
  2. GL_ZERO TexEnv?
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 09-05-2004, 03:55 PM
  3. texEnv
    By goldwire32767 in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 04-16-2004, 02:31 PM
  4. is TexEnv bind to texture object ?
    By rixed in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-22-2001, 05:12 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