From: MLM Veraart (veraart++at++fel.tno.nl)
Date: 12/09/2003 05:04:01
Hello,
To my knowledge the colormatrix is not part of the polygon pipeline.
It is part of the draw/copy pixel pipeline.
What you can look for if it will help is the texture color table extension from SGI.
This will enable you to change the sampled texture color before it is used in the
texture blending.
glColorTableSGI(GL_TEXTURE_COLOR_TABLE_SGI,.....);
Mario Veraart
faculaganymede wrote:
>
> Hi all,
>
> Has anyone been successful in using
> glMatrixMode(GL_COLOR) and glLoadMatrixf(<matrix>) in
> their Performer application?
>
> I need to manipulate the RGBA color components of the
> framebuffer so new RGBA = (orig RGBA * 4x4 matrix).
> In my program, I created a simple triangle and set its
> overall color to (0.5, 0.0, 0.5, 1.0)=purple. If
> everything works correctly, I should see the color of
> the triangle on the screen as new RGBA = (orig RGBA *
> 4x4 matrix)=(1.0, 0.0, 0.5, 1.0)=pink, but the
> triangle remains purple. Matrix is colorMat[16]
> below.
>
> I tried other matrices of various values but they
> seemed to have no affect on the color of my triangle.
> The only thing that seemed to be affected is the color
> of the text string "Powered by OpenGL Performer..."
> (when running Performer Demo). Please advise!
>
> Here are fragments of my code:
> ...
> chan->setTravFunc(PFTRAV_DRAW,DrawChannel);
> ...
>
> static GLfloat colorMat[16]={ 1.0f, 0.0f, 0.0f, 0.0f,
> 0.0f, 1.0f, 0.0f, 0.0f,
> 1.0f, 0.0f, 1.0f, 0.0f,
> 0.0f, 0.0f, 0.0f, 1.0f};
> ...
> static void DrawChannel (pfChannel *chan, void *)
> {
> chan->clear();
>
> glMatrixMode(GL_COLOR);
> glLoadMatrixf((const GLfloat*)colorMat);
> glMatrixMode(GL_MODELVIEW):
>
> pfDraw();
> }
> ...
>
> =====
> Thanks,
> faculaganymede
-- ------------------------------------------------------------------------------ The disclaimer that applies to e-mail from TNO Physics and Electronics Laboratory can be found on: http://www.tno.nl/disclaimer/email.html ------------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Tue Dec 09 2003 - 05:52:25 PST