order of operation for vertex arrays

This topic contains 2 replies, has 2 voices, and was last updated by  Martin Kraus 7 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30234

    Hi,

    this might be a trivial question, but I never thought about it: is the result of rendering primitives in a vertex array with a single glDraw* call guaranteed to be the same as if the primitives were rendered with one glDraw* call for each primitive in the order the primitives are specified in the array?

    I.e. if I sort vertices in a vertex array from back to front and render points with a order-dependent blending and one single glDraw* call, am I guaranteed to get the same result as when sending one glDraw* call for each point primitive in the sorted order?

    My confusion might be due to the OpenGL ES 2.0 specification (page 4):
    “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.”

    To me, the phrase “this means” makes only sense if each command (i.e. GL function call) can only produce at most one primitive. But a glDraw* call may render many primitives. Thus, if only the order of the commands is specified, then the order of the primitives of the same glDraw* call would be unspecified.

    Anyway, my question is: does PowerVR hardware guarantee the order of rendered primitives even if they are in the same glDraw* call?

    #34181

    Xmas
    Member

    Yes, primitives are guaranteed to be processed in the order in which they are specified.

    #34182

    Thanks! 

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.