OpenGL - Display single color channel

Discussion in 'C++' started by lechoo, Jun 22, 2010.

  1. lechoo

    lechoo New Member

    Joined:
    Jun 22, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    using imagemagick I'm loading image form file. Code below gives normal RGB colors.

    im.read(filename);
    im.write(&blob, "RGB", 8);
    glTexImage2D(GL_TEXTURE_2D, 0, 3, im.columns(), im.rows(), 0, GL_RGB, GL_UNSIGNED_BYTE, blob.data());

    Then texture is applied onto geometry.

    Is it possible to force OpenGL to display only (for example) green channel but in all color components, I'm looking for something like GL_GGG. I want to avoid reloading different color components every time user wants to see different color channel.

    regards
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice