Results 1 to 4 of 4

Thread: About GlColorxx();

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    France
    Posts
    6

    About GlColorxx();

    Hello !

    Using a GlColor3f(); to set the color of a vertex allow to multiply the texture color by the argument given in GlColor3f();

    Is there any way to specify the operation ? ( substract / add ) ?

    Thank you.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: About GlColorxx();

    No, I don't think you can do it directly.

    But you can apply a texture to it and then texture when applied can be combined with the base color in a various operations, like add/sub with the glBlendFunc.

    also could use two vertex and the blend function would also allow you to mix the two.

    glBlendFunc
    glColorxx(Color1)
    vertex1
    glColerxx(Color2)
    vertex2


    There maybe also another way, but this is the first thing that came to mind.

    Originally posted by FlemTeam:
    Hello !

    Using a GlColor3f(); to set the color of a vertex allow to multiply the texture color by the argument given in GlColor3f();

    Is there any way to specify the operation ? ( substract / add ) ?

    Thank you.


    [This message has been edited by nexusone (edited 11-04-2002).]

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jun 2002
    Posts
    365

    Re: About GlColorxx();

    As previous post, check out glBlendFunc but also glBlendEquationEXT and glBlendColorEXT.

    They might have the features you're looking for.

    The last two requires some gl extensions though.

    You might also look at
    GL_ARB_texture_env_combine with CONSTANT_ARB
    and modulation.

    Extension registry: http://oss.sgi.com/projects/ogl-sample/registry/

    Opengl API: http://wwws.sun.com/software/graphic...n3glindex.html

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Oct 2001
    Posts
    595

    Re: About GlColorxx();

    I think you are erfering to the texture environment.. there you have Modulate (default), Decal, Blend and dome other mode.. and then you have extensions that adds more operations, as ADD, ADD_SIGNED and so on..


    Look at glTexEnv

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