shown black pixels as red

I’ve drawn a BMP image with glTexImage2D() and I need black pixels to be shown as red. How can I do it? Any ideas?

You can do that by a simple shader.


void main()
{
    vec4 color = texture2D(myTexture, texCoord.xy);
    if(color.rgb == vec3(0,0,0))
    {
       color.rgb = vec3(1,0,0);
    }

    gl_FragColor = color;
}

Or you can use oldstyle opengl colortable.

regards,
lobbel