Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Packed Vertex Data Formats

  1. #1
    Junior Member Newbie
    Join Date
    May 2012
    Posts
    3

    Packed Vertex Data Formats

    We have the extension GL_ARB_2_10_10_10_REV,and the Packed Vertex Data Formats as follow:
    The following figure describes how these components are laid out in a 32-bit word.
    31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

    -----------------------------------------------------------------------------------------------

    | w | z | y | x |

    -----------------------------------------------------------------------------------------------
    If <size> is BGRA, the components are instead laid out as in the following figure



    31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

    -----------------------------------------------------------------------------------------------

    | w | x | y | z |

    -----------------------------------------------------------------------------------------------
    question:I don't know the mean of "If <size> is BGRA, the components are instead laid out as in the following figure

    " ,and what do the <size> mean, where is it used? thanks!

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,728
    It means the same thing it means anywhere. The specs are all very consistent about this: names in <> refer to the parameters passed to the function (usually the last function mentioned in that section). In this case, glVertexAttribPointer.

    The <size> parameter can be 0, 1, 2, 3, or GL_BGRA. Yes, I know it's a GLuint, but they allow this special enum for this special condition. BTW, you should pretty much ignore this feature unless you're doing interoperation with D3D; that's what it's for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •