Results 1 to 6 of 6

Thread: glReadPixels

  1. #1
    Senior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Karlsruhe, Germany
    Posts
    360

    glReadPixels

    Does it imply a glFinish?

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: glReadPixels

    Somehow. If the call returns the data is guaranteed to be in your buffer.
    You don't need to send glFinish before or after, if that's your concern.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    340

    Re: glReadPixels

    Originally posted by Relic:
    If the call returns
    I must say I don't know how to interpret this.

  4. #4
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: glReadPixels

    Interpret it as: "At the time the glReadPixels call returns back from the OpenGL driver, the buffer specified by the pixels parameter will contain the appropriately stored and transfered pixel data generated by the OpenGL calls issued before that glReadPixel call."
    It's behaviour is similar to a glFinish in that respect.
    Most importantly you don't need to sync it vs. other OpenGL calls in the same thread.

  5. #5
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    340

    Re: glReadPixels

    Thanks for the clarification. My reading of your statement was that there was a possibility that the call would not return (at all! ).

  6. #6
    Senior Member Regular Contributor
    Join Date
    Jun 2002
    Posts
    365

    Re: glReadPixels

    Originally posted by Lev:
    Does it imply a glFinish?
    Yes. Quote from the specs:
    "Commands are always processed in the order in which they are received, although there may be an indeterminate delay before the effects of a command are realized. This means, for example, that one primitive must be drawn completely before any subsequent one can affect the framebuffer. It also means that queries and pixel read operations return state consistent with complete execution of all previously invoked GL commands."

Similar Threads

  1. PBO and glReadPixels()
    By ehsan2004 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-24-2007, 05:20 AM
  2. about glReadPixels
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-05-2006, 08:18 PM
  3. glReadPixels
    By mphanke in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-04-2002, 08:24 AM
  4. glReadPixels()
    By hatemagnet in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-11-2002, 10:17 PM
  5. glReadPixels
    By Dagana in forum OpenGL: Basic Coding
    Replies: 13
    Last Post: 08-02-2001, 10:14 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