Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 2. Math and Metaphors > Associating Properties with Vertices

2.3. Associating Properties with Vertices

Let’s go back to the assembly line and take a closer look at the inputs. Every vertex that you hand over to OpenGL has one or more attributes, the most crucial being its position. Vertex attributes in OpenGL ES 1.1 can have any of the forms listed in Table 2-2.

Table 2-2. Vertex attributes in OpenGL ES
AttributeOpenGL enumerantOpenGL function callDimensionalityTypes
PositionGL_VERTEX_ARRAYglVertexPointer2, 3, 4byte, short, fixed, float
NormalGL_NORMAL_ARRAYglNormalPointer3byte, short, fixed, float
ColorGL_COLOR_ARRAYglColorPointer4ubyte, fixed, float
Point SizeGL_POINT_SIZE_ARRAY_OESglPointSizePointerOES1fixed, float
Texture CoordinateGL_TEXTURE_COORD_ARRAYglTexCoordPointer2, 3, 4byte, short, fixed, float
Generic Attribute (ES 2.0)N/AglVertexAttribPointer1, 2, 3, 4byte, ubyte, short, ushort, fixed, float



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial