Results 1 to 4 of 4

Thread: Problems with glReadPixels???

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    16

    Problems with glReadPixels???

    I have a textured scene and I read the frame buffer using:

    glReadPixels (0, 0, winWidth, winHeight, GL_RGB, GL_UNSIGNED_BYTE, frameBuffer);

    Than I write them in TGA format and mostly everything is OK. Mainly I get the correct images.

    Anyway if I change only the texture files - sometimes only rotate a texture image in an external program-
    I get distorted images (starting from below some parts are good and than some are shifted in
    horizontal direction).
    1. something strange is happening inside glReadPixels?
    2. it is hardware-dependent - I get differently distorted images on different computers

    Does anybody know what is happening and how to avoid these problems????

  2. #2
    Member Contributor
    Join Date
    Feb 2000
    Location
    Italy
    Posts
    77

    Re: Problems with glReadPixels???

    I would call glFlush before reading pixels.
    Have you tried?
    --
    Paolo M.

  3. #3
    Senior Member Frequent Contributor imported_cass's Avatar
    Join Date
    Feb 2000
    Location
    Austin, TX, USA
    Posts
    913

    Re: Problems with glReadPixels???

    Also, make sure all your glPixelTransfer*() parameters are as you would expect. This is a common gotcha.
    Cass Everitt -- cass@xyzw.us

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    16

    Re: Problems with glReadPixels???

    Thank you for your wish to help me but it doesn't work!
    1. glFlush has nothing to do with it but I tried it anyway!
    2. the same for glPixelTransfer!

    Two more conclusion from the tests I made:
    1. The problem occures ONLY for textured images (and not always as I have already described)!
    2. The glCopyPixels is working properly so the problem is in transfering the data into the processor memory!
    I have set GL_PACK_ALIGNMENT to 1 (glPixel Store) but that doesn't help also!

    I don't see any solution ?
    Please HELP!!!

Similar Threads

  1. some problems with glReadPixels
    By peng530 in forum OpenGL: Basic Coding
    Replies: 19
    Last Post: 12-30-2008, 04:06 AM
  2. about glReadPixels
    By franz1999 in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 03-31-2005, 03:05 AM
  3. Replies: 8
    Last Post: 12-08-2003, 04:37 AM
  4. glReadPixels
    By mphanke in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-04-2002, 08:24 AM
  5. glReadPixels problems again
    By Zoran Zivkovic in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 05-10-2001, 08:48 PM

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