Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. glReadPixels unmatched values

glReadPixels unmatched values

Scheduled Pinned Locked Moved C / C++ / MFC
3 Posts 2 Posters 30 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    etechX2
    wrote on last edited by
    #1

    hi, glReadPixels(0,0,1,1,GL_LUMINANCE ,GL_UNSIGNED_SHORT,pixUnSigShort) , the return pixels values look wrong or unmatched to the raw data.

    V 1 Reply Last reply
    0
    • E etechX2

      hi, glReadPixels(0,0,1,1,GL_LUMINANCE ,GL_UNSIGNED_SHORT,pixUnSigShort) , the return pixels values look wrong or unmatched to the raw data.

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      etechX2 wrote:

      ... and is wrong.

      Define "wrong". :cool:

      E 1 Reply Last reply
      0
      • V Victor Nijegorodov

        etechX2 wrote:

        ... and is wrong.

        Define "wrong". :cool:

        E Offline
        E Offline
        etechX2
        wrote on last edited by
        #3

        16 bit pixel value bytes read from glReadPixels(0,0,,,) are like X1 X1 X2 X2 ... etc. They do not match the raw image pixels. The image is brighter liked a image that has a filter applied to it. I am not sure if I am reading from framebuffer. I sed GL_LUMINANCE with GL_UNSIGNED_SHORT. It is a grayscale image.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups