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: API about glVertexP{n}uiv(GL_INT_2_10_10_10, const int *value)

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

    API about glVertexP{n}uiv(GL_INT_2_10_10_10, const int *value)

    Hi All:
    Is there anyone konw about the principle how the const int *value translate into
    GL_INT_2_10_10_10 type!
    Thanks.
    BRS.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,732
    The way the OpenGL specification says it does. It's exactly as stated in the type: a single 32-bit integer, where the highest 2 bits are the last value (there is no GL_INT_2_10_10_10; only GL_INT_2_10_10_10_REV, so it's in reverse-order). Then there are 10 bits for the third value, 10 for the second, and the lowest 10 bits are the first. Each group of bits is a two's-compliment signed integer value.

Posting Permissions

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